Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #8867: clear_layout_conditions.diff

File clear_layout_conditions.diff, 0.7 kB (added by mikong, 1 year ago)
  • vendor/rails/actionpack/lib/action_controller/layout.rb

    old new  
    168168      # when the layout<tt>yield</tt>'s. This layout can itself depend on instance variables assigned during action 
    169169      # performance and have access to them as any normal template would. 
    170170      def layout(template_name, conditions = {}) 
     171        write_inheritable_attribute "layout_conditions", {} 
    171172        add_layout_conditions(conditions) 
    172173        write_inheritable_attribute "layout", template_name 
    173174      end