Commit Graph

67 Commits

Author SHA1 Message Date
David Heinemeier Hansson
2caf4d5a93 Added proper getters and setters for content type and charset [DHH] Added utf-8 as the default charset for all renders. You can change this default using ActionController::Base.default_charset=(encoding) [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5129 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-17 16:20:32 +00:00
Jeremy Kemper
89840c40ce Load helpers in alphabetical order for consistency. Resolve cyclic javascript_helper dependency. Closes #6132, closes #6178.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5095 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-12 22:07:18 +00:00
David Heinemeier Hansson
83313fccc0 Backed out of locals hash as it caused trouble with Builder, see ticket for more
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5043 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-06 03:38:11 +00:00
David Heinemeier Hansson
df70e28e03 Added locals hash to partials, which makes for convenient access of some times available/some times not variables (closes #5491) [wbruce@gmail.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4997 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-04 20:01:52 +00:00
Jeremy Kemper
12ff554cd4 Tighten rescue clauses. Closes #5985.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4885 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-31 03:16:28 +00:00
Jeremy Kemper
c40b1a4a67 Deprecate direct usage of @params. Update ActionView::Base for instance var deprecation.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4715 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-07 12:40:14 +00:00
Jeremy Kemper
1dc4cc030f Update documentation for erb trim syntax. Closes #5651.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4598 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-09 05:17:41 +00:00
David Heinemeier Hansson
ead99f3f2e Fixed that real files and symlinks should be treated the same when compiling templates (closes #5438) [zachary@panandscan.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4546 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-05 02:17:25 +00:00
Jeremy Kemper
546c04c6b4 Missing method_key.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4516 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-30 01:56:29 +00:00
Jeremy Kemper
9444206dd5 Retain symbol method key and assign_method_name.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4515 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-29 21:45:12 +00:00
Jeremy Kemper
ec43212206 r4732@asus: jeremy | 2006-06-29 13:51:32 -0700
Chop RAILS_ROOT from file path for readability. Preserve non-alphanumeric characters for uniqueness.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4514 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-29 20:52:00 +00:00
Jeremy Kemper
f3aa7c1e64 r4730@asus: jeremy | 2006-06-29 13:13:38 -0700
Avoid naming collision among compiled view methods. Back out AM workaround. References #5520.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4512 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-29 20:14:33 +00:00
David Heinemeier Hansson
496725022a Fixed that template extensions would be cached development mode #4624 [Stefan Kaes]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4189 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-06 18:08:31 +00:00
David Heinemeier Hansson
dfd953ea96 Fixed docs
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4079 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-28 03:19:27 +00:00
David Heinemeier Hansson
0c07e08d60 ActionView: Allow to register a Template handler with a Symbol (dont kill markaby) (closes #4328) [murphy@cYcnus.de]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4056 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-26 21:50:22 +00:00
David Heinemeier Hansson
d19e8f412f Performance speedup for ActionController (closes #4174) [Stefan Kaes] Includes caching of filter chains -- be on the lookout for problems with that!
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3989 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-20 04:01:10 +00:00
David Heinemeier Hansson
cc6e8ae57a Removed XML argument style for respond_to, so type.xml(object.to_xml) no longer works -- it wasnt worth the exception
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3944 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-18 21:17:14 +00:00
David Heinemeier Hansson
7d06259be9 Dots in template path should not trip up rendering (closes #4244) [lmarlow@yahoo.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3884 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-16 02:51:19 +00:00
Sam Stephenson
3589871de8 Added simple alert() notifications for RJS exceptions when config.action_view.debug_rjs = true. Set debug_rjs = true for the default development environment.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3856 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-13 02:11:59 +00:00
David Heinemeier Hansson
06c2b43f36 Rendering xml shouldnt happen inside any layout. Added class proxying to RJS, so you can call page.field.clear("my_field") to generate Field.clear("my_field");. Added :content_type option to render, so you can change the content type on the fly. Do type/subtype reordering of Accept header preferences for xml types (aka make Firefox work with respond_to). CHANGED DEFAULT: The default content type for .rxml is now application/xml instead of type/xml, see http://www.xml.com/pub/a/2004/07/21/dive.html for reason
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3852 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-13 01:33:57 +00:00
David Heinemeier Hansson
6e3e5cadfb Added option to render action/template/file of a specific extension (and here by template type). This means you can have multiple templates with the same name but a different extension [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3841 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-12 01:56:55 +00:00
Sam Stephenson
7d0d0f0edd Add render(:update) to ActionView::Base
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3473 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-01-23 16:36:40 +00:00
Marcel Molina
06e74b6c91 Add support for new rjs templates which wrap an update_page block.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3078 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-17 21:28:59 +00:00
Jeremy Kemper
c63f3bdc7a Inline commonly-called template presence checks. Closes #2882.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3057 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-16 09:03:00 +00:00
Jeremy Kemper
44ca6f4b62 Only include builtin filters whose filenames match /^[a-z][a-z_]*_helper.rb$/ to avoid including operating system metadata such as ._foo_helper.rb. References #2855.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3007 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-13 22:21:19 +00:00
David Heinemeier Hansson
3c31062c3d Added request as instance method to views, so you can do <%= request.env["HTTP_REFERER"] %>, just like you can already access response, session, and the likes [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2918 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-07 13:51:56 +00:00
Nicholas Seckar
139ba0aaf6 Fix spelling error
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2667 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-17 18:25:03 +00:00
Nicholas Seckar
cb8bb70aa7 Make string-keys locals assigns optional
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2665 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-17 15:51:07 +00:00
Jamis Buck
1c057b7237 Update/clean up AP documentation (rdoc)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2649 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-16 15:42:03 +00:00
Nicholas Seckar
e625d27633 Add temporary support for passing locals to render using string keys
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2630 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-16 00:04:33 +00:00
Nicholas Seckar
3625dfaad5 Clean up error pages by providing better backtraces
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2624 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-15 19:05:15 +00:00
Nicholas Seckar
2cad95d851 Improved line number reporting for template errors
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2571 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-13 21:58:20 +00:00
Marcel Molina
7aa1ba7ff0 Misc doc fixes (typos/grammar/etc). Closes #2445.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2537 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-12 03:43:28 +00:00
David Heinemeier Hansson
981763e53e My life for white space
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2393 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-28 09:06:34 +00:00
Nicholas Seckar
564077373d Streamline render process, code cleaning. Closes #2294.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2368 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-27 16:45:39 +00:00
David Heinemeier Hansson
e3c02d8c66 Fixed that render :partial would fail when :object was a Hash (due to backwards compatibility issues) #2148 [Sam Stephenson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2160 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-09 07:27:44 +00:00
Jamis Buck
e758c2e9db Yield @content_for_ variables to templates #2058 [Sam Stephenson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2094 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-01 21:51:27 +00:00
Nicholas Seckar
a8b9fc9f2a Add dummy ActionView::Base.cache_template_loading accessor -- will be made functional again in short time
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2066 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-08-29 15:12:48 +00:00
Nicholas Seckar
68c90ab019 Render refactoring; render error reporting fixes
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2058 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-08-26 22:37:36 +00:00
David Heinemeier Hansson
9fad3251d3 More fixes, but still broken
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1948 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-27 14:17:47 +00:00
David Heinemeier Hansson
c22ebd909d Fixing the fix, but not quite
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1946 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-27 13:55:56 +00:00
David Heinemeier Hansson
11a51648ad Document the design of the compiled templates approach and tweak the expiration check
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1929 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-26 12:37:21 +00:00
David Heinemeier Hansson
4f40b2d8fb Improved performance of test app req/sec with ~10% refactoring the render method #1823 [Stefan Kaes]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1915 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-24 16:45:39 +00:00
David Heinemeier Hansson
023c4d68cc Caching template logging goes DEBUG
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1903 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-23 06:27:52 +00:00
David Heinemeier Hansson
7fe3fd23b3 Extended template caching to rxml and attempted to fix periodical caching issue [Stephan Kaes]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1902 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-23 06:14:10 +00:00
David Heinemeier Hansson
98fb9e5093 Fixed call on inline with new render_template #1808 [Michael Shuerig]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1898 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-22 20:46:36 +00:00
David Heinemeier Hansson
c19ca5148f Fixed changing templates in development mode [Stephan Kaes]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1891 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-22 15:51:34 +00:00
David Heinemeier Hansson
3835f6ab25 Changed caching/expiration/hit to report using the DEBUG log level and errors to use the ERROR log level instead of both using INFO
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1889 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-22 11:28:58 +00:00
David Heinemeier Hansson
06160fd3e8 Use debug to report compilation of erb templates
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1885 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-22 10:11:36 +00:00
David Heinemeier Hansson
95cd46c5ec Fixed compile of template fails if template name contains non-word character #1802
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1883 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-22 07:39:48 +00:00