Changeset 3316
- Timestamp:
- 12/17/05 06:38:06 (3 years ago)
- Files:
-
- trunk/actionpack/CHANGELOG (modified) (1 diff)
- trunk/actionpack/lib/action_controller/base.rb (modified) (1 diff)
- 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
r3301 r3316 1 1 *SVN* 2 3 * Don't include a layout when rendering an rjs template using render's :template option. [Marcel Molina Jr.] 2 4 3 5 * Update to script.aculo.us 1.5.0 final (equals 1.5.0_rc6) [Thomas Fuchs] trunk/actionpack/lib/action_controller/base.rb
r3157 r3316 938 938 939 939 def default_template_name(default_action_name = action_name) 940 default_action_name = default_action_name.dup 941 strip_out_controller!(default_action_name) if template_path_includes_controller?(default_action_name) 940 942 "#{self.class.controller_path}/#{default_action_name}" 943 end 944 945 def strip_out_controller!(path) 946 path.replace path.split('/', 2).last 947 end 948 949 def template_path_includes_controller?(path) 950 path.to_s['/'] && self.class.controller_path.split('/')[-1] == path.split('/')[0] 941 951 end 942 952 end trunk/actionpack/lib/action_controller/layout.rb
r3111 r3316 238 238 (options.has_key?(:layout) && options[:layout] != false) || 239 239 options.values_at(:text, :file, :inline, :partial, :nothing).compact.empty? && 240 !template_exempt_from_layout?(default_template_name(options[:action] ))240 !template_exempt_from_layout?(default_template_name(options[:action] || options[:template])) 241 241 end 242 242 trunk/actionpack/test/controller/new_render_test.rb
r3157 r3316 210 210 "accessing_params_in_template_with_layout", 211 211 "render_with_explicit_template", 212 "test_rendering_rjs_action_explicitly" 212 "render_js_with_explicit_template", 213 "render_js_with_explicit_action_template", 214 "delete_with_js" 215 213 216 "layouts/standard" 214 217 when "builder_layout_test"