diff options
author | Yehuda Katz <wycats@gmail.com> | 2009-08-07 15:00:12 -0300 |
---|---|---|
committer | Yehuda Katz <wycats@gmail.com> | 2009-08-07 15:00:12 -0300 |
commit | 010a0c92eb573cd4c216c51371356adddfde11cf (patch) | |
tree | 96da751eaf21bcac20818440657b3f38a6687ffc /actionpack/lib/abstract_controller | |
parent | 55575e21655023259d0dae22bc1b148b34168d92 (diff) | |
download | rails-010a0c92eb573cd4c216c51371356adddfde11cf.tar.gz rails-010a0c92eb573cd4c216c51371356adddfde11cf.tar.bz2 rails-010a0c92eb573cd4c216c51371356adddfde11cf.zip |
Rename find_by_parts and find_by_parts? to find and exists?
Diffstat (limited to 'actionpack/lib/abstract_controller')
-rw-r--r-- | actionpack/lib/abstract_controller/layouts.rb | 4 | ||||
-rw-r--r-- | actionpack/lib/abstract_controller/rendering_controller.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/abstract_controller/layouts.rb b/actionpack/lib/abstract_controller/layouts.rb index 0cb3d166f7..c1fb80415b 100644 --- a/actionpack/lib/abstract_controller/layouts.rb +++ b/actionpack/lib/abstract_controller/layouts.rb @@ -76,7 +76,7 @@ module AbstractController when nil self.class_eval <<-ruby_eval, __FILE__, __LINE__ + 1 def _layout(details) - if view_paths.find_by_parts?("#{_implied_layout_name}", details, "layouts") + if view_paths.exists?("#{_implied_layout_name}", details, "layouts") "#{_implied_layout_name}" else super @@ -131,7 +131,7 @@ module AbstractController def _find_layout(name, details) # TODO: Make prefix actually part of details in ViewPath#find_by_parts prefix = details.key?(:prefix) ? details.delete(:prefix) : "layouts" - view_paths.find_by_parts(name, details, prefix) + view_paths.find(name, details, prefix) end # Returns the default layout for this controller and a given set of details. diff --git a/actionpack/lib/abstract_controller/rendering_controller.rb b/actionpack/lib/abstract_controller/rendering_controller.rb index 23cd71e0bd..bb7891fbfd 100644 --- a/actionpack/lib/abstract_controller/rendering_controller.rb +++ b/actionpack/lib/abstract_controller/rendering_controller.rb @@ -111,7 +111,7 @@ module AbstractController def _determine_template(options) name = (options[:_template_name] || action_name).to_s - options[:_template] ||= view_paths.find_by_parts( + options[:_template] ||= view_paths.find( name, { :formats => formats }, options[:_prefix], options[:_partial] ) end |