mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Fix rendering of layouts.
This commit is contained in:
@@ -157,7 +157,8 @@ module AbstractController
|
||||
options[:_template_name] = options[:file]
|
||||
end
|
||||
|
||||
name = (options[:_template_name] || action_name).to_s
|
||||
name = (options[:_template_name] || options[:action] || action_name).to_s
|
||||
options[:_prefix] ||= _prefix if (options.keys & [:partial, :file, :template]).empty?
|
||||
|
||||
options[:_template] ||= with_template_cache(name) do
|
||||
find_template(name, { :formats => formats }, options)
|
||||
|
||||
@@ -58,11 +58,6 @@ module ActionController
|
||||
options.merge! :partial => action
|
||||
end
|
||||
|
||||
if (options.keys & [:partial, :file, :template, :text, :inline]).empty?
|
||||
options[:_template_name] ||= options[:action]
|
||||
options[:_prefix] = _prefix
|
||||
end
|
||||
|
||||
if options[:status]
|
||||
options[:status] = Rack::Utils.status_code(options[:status])
|
||||
end
|
||||
|
||||
@@ -11,13 +11,13 @@ module AbstractController
|
||||
end
|
||||
|
||||
self.view_paths = [ActionView::FixtureResolver.new(
|
||||
"default.erb" => "With Default",
|
||||
"template.erb" => "With Template",
|
||||
"renderer/default.erb" => "With Default",
|
||||
"renderer/string.erb" => "With String",
|
||||
"renderer/symbol.erb" => "With Symbol",
|
||||
"renderer/template_name.erb" => "With Template Name",
|
||||
"string/with_path.erb" => "With String With Path",
|
||||
"some/file.erb" => "With File",
|
||||
"template_name.erb" => "With Template Name"
|
||||
"some/file.erb" => "With File"
|
||||
)]
|
||||
|
||||
def template
|
||||
|
||||
Reference in New Issue
Block a user