aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/new_base/compatibility.rb
blob: 275a18abfd0f9fe081906eee1d240e21d6941fe9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
module ActionController
  module Rails2Compatibility
  
    def render_to_body(options)
      if options.is_a?(Hash) && options.key?(:template)
        options[:template].sub!(/^\//, '')
      end
      super
    end
   
   def _layout_for_name(name)
     name &&= name.sub(%r{^/?layouts/}, '')
     super
   end
   
  end
end