157 Commits

Author SHA1 Message Date
Charlie Somerville
15678eac1c delete rjs templates 2013-10-24 12:58:08 -04:00
Michael Lovitt
257a29d3cc Sessions should not be created until written to and session data should be destroyed on reset. [#4938 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-14 08:04:37 +02:00
Santiago Pastorino
6b0616d1b8 translation method of TranslationHelper module returns a SafeBuffer Array backport
[#4675 state:committed]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-24 20:56:44 +02:00
Santiago Pastorino
d3da1a2c66 Revert "translation method of TranslationHelper module returns always SafeBuffer [#4194 status:resolved]"
This reverts commit 2310aef29b.

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-24 20:56:44 +02:00
Jeremy Kemper
c66013e2c5 Fix that captured content (e.g. with form_for or div_for) would be HTML-escaped even without the rails_xss plugin installed. Rails 2.3.7, we barely knew ya... 2010-05-24 09:12:00 -07:00
Jeff Kreeftmeijer
2de364636c partial counters with :as [#2804 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-05-15 10:32:45 -07:00
Jeremy Kemper
f6e71c674c Expect an incompatible encoding exception when a template with a magic comment renders a partial without one and its source encoding doesn't match the default external encoding 2010-04-24 17:12:05 -07:00
Jeremy Kemper
fb545f4c60 Expect an incompatible encoding exception when a template doesn't have a magic comment and its source encoding doesn't match the default external encoding 2010-04-24 17:12:00 -07:00
Jeremy Kemper
70034d820f Ensure ERB source begins with the encoding comment 2010-04-24 17:04:50 -07:00
Jeremy Kemper
81e06075b7 Ruby 1.9: ERB template encoding using a magic comment at the top of the file 2010-04-24 17:01:52 -07:00
David Heinemeier Hansson
0653a6d30e Fixed that default locale templates should be used if the current locale template is missing [DHH] 2010-04-08 17:15:11 -07:00
Santiago Pastorino
9cfa87519d scope_key_by_partial fix for Ruby 1.9 when there's virtual_path
[#4202 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-03-16 16:05:24 -07:00
Santiago Pastorino
2310aef29b translation method of TranslationHelper module returns always SafeBuffer [#4194 status:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-03-16 13:49:59 -07:00
Gaspard Bucher
8371d6f0c1 Fixes a bug where layouts provided with an absolute path would not be found because they were prefixed by 'layouts'. This bug only appears if the path does not contain the word 'layouts'.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#3207 state:committed]
2009-09-28 14:40:21 +13:00
Eloy Duran
cddd4746f9 Rewrote ActionView::TestCase.
The test case now mimicks the template environment more closely, so it's
possible to use render, load helper dependencies.

This also fixes assert_select, and similar assertions. Because view tests
and helpers generally don't render full templates assert_select looks
first in rendered and then in output_buffer to find the rendered output.
2009-09-25 15:51:27 +02:00
Michael Koziarski
143c55d325 Memoize cookies so that updates to cookies are available in the current request. [#2733 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>

Conflicts:

	actionpack/test/controller/cookie_test.rb
2009-07-22 09:46:53 +12:00
Hongli Lai (Phusion)
34a1ed0df8 Make the Failsafe middleware attempt to render 500.html during failsafe response rendering. Also make the default static failsafe response more friendly, in case 500.html rendering fails. [#2715 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-05-27 14:59:11 -05:00
Joshua Peek
ea8488caef Fixed simplified render with nested models [#2042 state:resolved] 2009-03-07 14:05:18 -06:00
Matt Jones
87e8b16246 fix HTML fallback for explicit templates [#2052 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-03-07 13:32:46 -06:00
Joshua Peek
92a30b0c88 missed template fixtures with ~ 2009-02-24 11:36:58 -06:00
Matt Jones
b35562f432 correctly handle layouts for AJAX requests and regular js files [#2052 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-02-24 10:38:07 -06:00
Sven Fuchs
8c5cc66a83 make action_controller/layouts pick templates from the current instance's view_paths instead of the class view_paths [#1974 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-02-20 14:19:45 -06:00
Joshua Peek
e4a7c0bb5b ~ backup files don't clobber original templates [#1818 state:resolved] 2009-02-07 12:06:35 -06:00
José Valim
50f51ff950 Render implicit html template when xhr request now supports localization [#1886 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-02-07 11:37:02 -06:00
José Valim
24f2e676f7 Added support to dashed locales in templates localization [#1888 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-02-06 23:23:50 -06:00
Eugene Pimenov
b1c1e3deb7 Ruby 1.9 compat: change encoding of action_view/renderable to utf-8, so erb templates can use utf-8 properly
[#1881 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-02-06 11:03:41 -08:00
Adam McCrea
06182ea02e implicitly rendering a js response should not use the default layout [#1844 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-02-05 15:23:05 -06:00
José Valim
2ecc678ed6 Added localized rescue (404.da.html) [#1835 state:committed]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2009-02-02 17:56:22 +01:00
Joshua Peek
093f758bd0 Restore implicit rendering for XHR requests that want a HTML template [#1590 state:resolved] 2009-01-27 14:09:11 -06:00
Joshua Peek
a98cd7ca9b Add localized templates
# Default locale
  app/views/messages/index.html.erb

  # I18n.locale is set to :da (Danish)
  app/views/messages/index.da.html.erb
2009-01-25 22:51:21 -06:00
Pratik Naik
617ad23574 Remove the irrelevant fixture added in fe6ffce51d 2009-01-24 18:22:17 +00:00
Pratik Naik
fe6ffce51d Make sure inner scope conditions get a preference over the outer ones 2009-01-24 17:54:10 +00:00
Joshua Peek
a8ad6568f9 Allow empty files to be uploaded 2009-01-20 20:34:35 -06:00
Mislav Marohnić
01f06fc7f4 Don't let empty Tempfiles come through as uploaded files [#1785 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-01-20 12:38:25 -06:00
Joshua Peek
f7ee082bb3 Add failing test for file uploads with unrewindable input 2009-01-02 18:46:01 -06:00
Sam Stephenson
ab211bf592 Fix rendering html partials from an rjs template
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-12-04 16:35:13 -06:00
Joshua Peek
2fc6c7dd05 Validate template extensions [#1187 state:resolved] 2008-12-03 10:57:35 -06:00
Sam Pohlenz
5ea9f2cac6 Allow helpers directory to be overridden via ActionController::Base.helpers_dir (Sam Pohlenz) [#1424 state:committed]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2008-11-23 13:42:53 +01:00
David Heinemeier Hansson
130fe74d17 Changed the default of ActionView#render to assume partials instead of files when not given an options hash [DHH] 2008-11-19 14:00:16 +01:00
Luke Melia
60d6f25517 Fix rendering html partial via inline render when with :js format [#1399 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-11-18 15:19:16 -06:00
Joshua Peek
ec38c84ce1 Dup local assigns for partial collections so nil values doesn't get overwritten [#1250 state:resolved] 2008-10-30 15:07:47 -05:00
Ryan Bates
4ad5aa9a39 Ensure @content_for_* is checked before yielding to block in render :layout [#8994 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-10-28 17:31:33 -05:00
Joshua Peek
ac50ee0edf Track rendered templates in stack so the current template can always be accessed. Added ActionView::Base#template to access the template object. 2008-10-28 11:06:08 -05:00
Claudio Poli
5f83e1844c Fixed missing template paths on exception [#1082 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-09-20 22:57:45 -05:00
Ryan Bates
38c7d73e73 pass yielded arguments to block for ActionView::Base#render with :layout [#847 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-08-17 19:29:24 -05:00
Joshua Peek
3b9324e62f Fix rendering partials at the top level [#795 state:resolved] 2008-08-13 19:15:35 -05:00
Cameron Yule
2faf35cea9 Added tests for partial collection counters [#766 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-08-09 10:48:56 -05:00
Tom Ward
c3d1fda555 Set the response content type to that of found template if not explicitly set elsewhere [#444 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-07-18 20:14:12 -05:00
Joshua Peek
8b306bf24c Improved test coverage for fragment cache helper 2008-07-15 20:54:17 -05:00
Joshua Peek
e0fef66149 Made ActionView::Base#first_render a little more private. And added _last_render to track the most recent render. Will fix #609 as a side effect. [#609 state:resolved] 2008-07-13 13:26:48 -05:00