private Method

ClassMethods.inherited_with_layout(child)

There's no documentation for this item.

Source Code

# File action_controller/layout.rb, line 195
def inherited_with_layout(child)
  inherited_without_layout(child)
  unless child.name.blank?
    layout_match = child.name.underscore.sub(/_controller$/, '').sub(/^controllers\//, '')
    child.layout(layout_match, {}, true) unless child.layout_list.grep(%r{layouts/#{layout_match}(\.[a-z][0-9a-z]*)+$}).empty?
  end
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.