Changeset 3084
- Timestamp:
- 11/18/05 08:32:17 (4 years ago)
- Files:
-
- trunk/actionpack/CHANGELOG (modified) (1 diff)
- trunk/actionpack/lib/action_controller/base.rb (modified) (2 diffs)
- trunk/actionpack/lib/action_controller/layout.rb (modified) (1 diff)
- trunk/actionpack/test/controller/new_render_test.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/CHANGELOG
r3080 r3084 1 1 *SVN* 2 3 * Make rjs templates always implicitly skip out on layouts. [Marcel Molina Jr.] 2 4 3 5 * Correct length for the truncate text helper. #2913 [Stefan Kaes] trunk/actionpack/lib/action_controller/base.rb
r3015 r3084 638 638 639 639 def render_action(action_name, status = nil, with_layout = true) 640 if with_layout 641 render_with_layout(default_template_name(action_name), status) 640 template = default_template_name(action_name) 641 if with_layout && !template_exempt_from_layout?(template) 642 render_with_layout(template, status) 642 643 else 643 render_with _no_layout(default_template_name(action_name), status)644 render_without_layout(template, status) 644 645 end 645 646 end … … 920 921 end 921 922 923 def template_exempt_from_layout?(template_name = default_template_name) 924 @template.javascript_template_exists?(template_name) 925 end 926 922 927 def assert_existance_of_template_file(template_name) 923 928 unless template_exists?(template_name) || ignore_missing_templates trunk/actionpack/lib/action_controller/layout.rb
r2777 r3084 230 230 private 231 231 def apply_layout?(template_with_options, options) 232 if template_with_options 233 (options.has_key?(:layout) && options[:layout]!=false) || options.values_at(:text, :file, :inline, :partial, :nothing).compact.empty? 234 else 235 true 236 end 232 template_with_options ? candidate_for_layout?(options) : !template_exempt_from_layout? 233 end 234 235 def candidate_for_layout?(options) 236 (options.has_key?(:layout) && options[:layout] != false) || 237 options.values_at(:text, :file, :inline, :partial, :nothing).compact.empty? && 238 !template_exempt_from_layout?(default_template_name(options[:action])) 237 239 end 238 240 trunk/actionpack/test/controller/new_render_test.rb
r3078 r3084 193 193 "accessing_params_in_template", 194 194 "accessing_params_in_template_with_layout", 195 "render_with_explicit_template" 195 "render_with_explicit_template", 196 "test_rendering_rjs_action_explicitly" 196 197 "layouts/standard" 197 198 when "builder_layout_test"