Commit Graph

63 Commits

Author SHA1 Message Date
Jeremy Kemper
f7bb3ddce8 Fix render :location => ... test.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6762 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-18 05:25:17 +00:00
David Heinemeier Hansson
ebee0a742d Added url_for usage on render :location, which allows for record identification [DHH] (still need to figure out why that test doesnt pass, seems like a test issue)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6750 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-17 20:48:47 +00:00
David Heinemeier Hansson
82d70d1d16 Added that render :xml will try to call to_xml if it can [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6574 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-04-24 18:29:37 +00:00
Jeremy Kemper
83c8db9818 Deprecation: remove deprecated instance variables.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6399 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-13 03:49:52 +00:00
David Heinemeier Hansson
e105653066 Added .erb and .builder as preferred aliases to the now deprecated .rhtml and .rxml extensions [Chad Fowler]. This is done to separate the renderer from the mime type. .erb templates are often used to render emails, atom, csv, whatever. So labeling them .rhtml doesn't make too much sense. The same goes for .rxml, which can be used to build everything from HTML to Atom to whatever. .rhtml and .rxml will continue to work until Rails 3.0, though. So this is a slow phasing out. All generators and examples will start using the new aliases, though.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6178 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-20 22:09:12 +00:00
David Heinemeier Hansson
9e4c8b8858 Fix tests depending too deep
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6169 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-19 02:25:01 +00:00
Rick Olson
69b0e5c44a Allow Controllers to have multiple view_paths instead of a single template_root. Closes #2754 [John Long]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6120 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-04 20:47:05 +00:00
Jeremy Kemper
89b472aa0c Test proving render_to_string result passed to partial works. Closes #2541. [smeade]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5893 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-12 06:10:06 +00:00
Jeremy Kemper
6fc8e143c6 Ensure render_to_string cleans up after itself when an exception is raised. Closes #6658. Great tests!
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5591 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-20 11:03:21 +00:00
Jeremy Kemper
57313c54bf assert_response supports symbolic status codes. Closes #6569.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5466 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-07 21:45:10 +00:00
Jeremy Kemper
d7674637f9 Deprecation: @request will be removed after 1.2. Use the request method instead.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5201 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-29 07:34:02 +00:00
Jamis Buck
c0eccc9aef modify head so that you can specify a bare status code as the first parameter
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5200 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-28 19:32:40 +00:00
Jamis Buck
b2ede64a89 Add ActionController::Base#head for rendering empty responses. Add support for symbolic status codes, as well as for having raw integer statuses expand with their default messages.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5199 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-28 19:13:55 +00:00
Sam Stephenson
236cf90bf1 Update RJS render tests.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5155 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-20 20:14:12 +00:00
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
ea831469a9 new render deprecations test
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4974 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-04 05:09:18 +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
de660957a5 Added defaults to respond_to [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3842 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-12 03:39:58 +00:00
David Heinemeier Hansson
1c16649b48 Added better support for using the same actions to output for different sources depending on the Accept header [DHH] Added Base#render(:xml => xml) that works just like Base#render(:text => text), but sets the content-type to text/xml and the charset to UTF-8 [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3838 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-11 01:23:29 +00:00
Rick Olson
043bee3338 Re-added mixed-in helper methods for the JavascriptGenerator. Moved JavascriptGenerators methods to a module that is mixed in after the helpers are added. Also fixed that variables set in the enumeration methods like #collect are set correctly. Documentation added for the enumeration methods [Rick Olson].
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3814 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-08 05:21:27 +00:00
David Heinemeier Hansson
5f724b516c Fixed tests (closes #4087) [Rick Olson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3773 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-05 16:35:27 +00:00
David Heinemeier Hansson
16b9409a9c allow RJS enum values to be passed to visual_effect() and other scriptaculous helpers #4080 [Rick Olson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3772 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-05 06:42:58 +00:00
David Heinemeier Hansson
1812dbbfde Make RJS treat symbolic action names nicely #3861 [Rick Olson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3596 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-17 18:32:21 +00:00
Nicholas Seckar
d2adec438e Ensure assigns are copied to the template when using render :update. Closes #3620.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3497 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-01-30 04:49:17 +00:00
Sam Stephenson
9c52a41241 Add the ability to call JavaScriptGenerator methods from helpers called in update blocks
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3476 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-01-23 17:09:15 +00:00
Sam Stephenson
4d49f2ca09 Fix render(:update) to not render layouts
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3472 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-01-23 16:29:37 +00:00
Sam Stephenson
06dd1f2ca3 Add render :update for inline RJS
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3441 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-01-20 22:04:07 +00:00
Marcel Molina
233208b8bb Don't try to strip out the controller name if default_action_name is nil
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3321 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-20 05:32:39 +00:00
Marcel Molina
39766a9b4c Don't include a layout when rendering an rjs template using render's :template option.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3316 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-17 06:38:06 +00:00
Sam Stephenson
bea737eb5a Make ActionController's render honor the :locals option when rendering a :file. Closes #1665.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3157 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-22 08:37:04 +00:00
Marcel Molina
62fe5bbfb1 Make rjs templates always implicitly skip out on layouts.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3084 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-18 08:32:17 +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
David Heinemeier Hansson
cb0e27cee9 Fix that render :text didn't interpolate instance variables (Closes #2629, #2626) [skaes]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2777 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-28 07:33:54 +00:00
Sam Stephenson
0886bb391d Fixed that an instance variable with the same name as a partial should be implicitly passed as the partial :object. Closes #2269.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2522 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-10 20:35:13 +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
Jamis Buck
01af965a3e Make rendering an empty partial collection behave like :nothing => true #2080 [Sam Stephenson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2093 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-01 21:43:38 +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
Jamis Buck
a3469cadad Make sure :layout => false is always used when rendering inside a layout
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1970 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-08-05 20:51:03 +00:00
Jamis Buck
08ebab5d20 Make sure assigns are built for every request when testing #1866
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1961 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-31 12:16:21 +00:00
David Heinemeier Hansson
3d2f0001ea Fixed bug when a partial render was passing a local with the same name as the partial
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1942 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-27 12:24:14 +00:00
David Heinemeier Hansson
d9033bbb28 Demonstrate breakage better
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1941 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-27 12:06:19 +00:00
David Heinemeier Hansson
e95dd53a5d Added two failing tests for partials with locals from controller
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1937 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-27 09:11:00 +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
b366dbd952 Improved performance with 5-30% through a series of Action Pack optimizations #1811 [Stefan Kaes]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1905 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-23 09:00:05 +00:00
David Heinemeier Hansson
d172592985 Added test for template to layout variable transfer
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1904 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-23 08:43:01 +00:00
David Heinemeier Hansson
bd558ef98e Improved rendering speed on complicated templates by up to 25% #1234 [Stephan Kaes]. This did necessasitate a change to the internals of ActionView#render_template that now has four parameters. Developers of custom view handlers (like Amrita) need to update for that.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1874 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-21 07:14:35 +00:00
David Heinemeier Hansson
807df4fcf0 Made test_rendering_nothing_on_layout acknowledge the space
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1831 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-14 07:19:26 +00:00
Jamis Buck
8266867881 Improved error message for DoubleRenderError
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1779 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-09 15:31:06 +00:00