lib/action_view/view_paths.rb in actionview-4.2.11.3 vs lib/action_view/view_paths.rb in actionview-5.0.0.beta1

- old
+ new

@@ -14,48 +14,32 @@ :locale, :locale=, :to => :lookup_context module ClassMethods def _prefixes # :nodoc: @_prefixes ||= begin - deprecated_prefixes = handle_deprecated_parent_prefixes - if deprecated_prefixes - deprecated_prefixes - else - return local_prefixes if superclass.abstract? + return local_prefixes if superclass.abstract? - local_prefixes + superclass._prefixes - end + local_prefixes + superclass._prefixes end end private # Override this method in your controller if you want to change paths prefixes for finding views. # Prefixes defined here will still be added to parents' <tt>._prefixes</tt>. def local_prefixes [controller_path] end - - def handle_deprecated_parent_prefixes # TODO: remove in 4.3/5.0. - return unless respond_to?(:parent_prefixes) - - ActiveSupport::Deprecation.warn(<<-MSG.squish) - Overriding `ActionController::Base::parent_prefixes` is deprecated, - override `.local_prefixes` instead. - MSG - - local_prefixes + parent_prefixes - end end # The prefixes used in render "foo" shortcuts. def _prefixes # :nodoc: self.class._prefixes end - # LookupContext is the object responsible to hold all information required to lookup - # templates, i.e. view paths and details. Check ActionView::LookupContext for more - # information. + # <tt>LookupContext</tt> is the object responsible for holding all + # information required for looking up templates, i.e. view paths and + # details. Check <tt>ActionView::LookupContext</tt> for more information. def lookup_context @_lookup_context ||= ActionView::LookupContext.new(self.class._view_paths, details_for_lookup, _prefixes) end