diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index d233a67d78c38610accf2dd4616f1cacd76c504f..fc00517cea28e9698a53adc2a705c8d3dff85dd2 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Replace dubious controller parent class in filter docs. #3655, #3722 [info@rhalff.com, eigentone@gmail.com] + * Don't interpret the :value option on text_area as an html attribute. Set the text_area's value. #3752 [gabriel@gironda.org] * Fix remote_form_for creates a non-ajax form. [Rick Olson] diff --git a/actionpack/lib/action_controller/filters.rb b/actionpack/lib/action_controller/filters.rb index 0149d52303c16921194ca93e3f4b86007c3889fa..9bfe3ee1dab0a6dbfced9f9458ac2c6acd784abc 100644 --- a/actionpack/lib/action_controller/filters.rb +++ b/actionpack/lib/action_controller/filters.rb @@ -141,7 +141,7 @@ def self.append_features(base) # # will run the :authenticate filter # end # - # class SignupController < ActionController::Base + # class SignupController < ApplicationController # # will not run the :authenticate filter # skip_before_filter :authenticate # end diff --git a/actionpack/lib/action_controller/layout.rb b/actionpack/lib/action_controller/layout.rb index f2a5b97bf1af51e2c22a26f31f68bcbd9a4c8c18..0934b8bfdc6363dbbb52ef88d10839e620cc4e11 100644 --- a/actionpack/lib/action_controller/layout.rb +++ b/actionpack/lib/action_controller/layout.rb @@ -66,9 +66,11 @@ class << self # app/views/layouts/weblog.rhtml or app/views/layouts/weblog.rxml exists then it will be automatically set as # the layout for your WeblogController. You can create a layout with the name application.rhtml or application.rxml # and this will be set as the default controller if there is no layout with the same name as the current controller and there is - # no layout explicitly assigned with the +layout+ method. Setting a layout explicitly will always override the automatic behaviour - # for the controller where the layout is set. Explicitly setting the layout in a parent class, though, will not override the - # child class's layout assignement if the child class has a layout with the same name. + # no layout explicitly assigned with the +layout+ method. Nested controllers use the same folder structure for automatic layout. + # assignment. So an Admin::WeblogController will look for a template named app/views/layouts/admin/weblog.rhtml. + # Setting a layout explicitly will always override the automatic behaviour for the controller where the layout is set. + # Explicitly setting the layout in a parent class, though, will not override the child class's layout assignement if the child + # class has a layout with the same name. # # == Inheritance for layouts # @@ -175,7 +177,7 @@ def layout_conditions #:nodoc: def inherited_with_layout(child) inherited_without_layout(child) child.send :include, Reloadable - layout_match = child.name.underscore.sub(/_controller$/, '') + layout_match = child.name.underscore.sub(/_controller$/, '').sub(/^controllers\//, '') child.layout(layout_match) unless layout_list.grep(%r{layouts/#{layout_match}\.[a-z][0-9a-z]*$}).empty? end