diff options
Diffstat (limited to 'activemodel/lib/active_model/naming.rb')
-rw-r--r-- | activemodel/lib/active_model/naming.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/activemodel/lib/active_model/naming.rb b/activemodel/lib/active_model/naming.rb index fd0bc4e8e9..b22d9539b0 100644 --- a/activemodel/lib/active_model/naming.rb +++ b/activemodel/lib/active_model/naming.rb @@ -6,13 +6,11 @@ require 'active_support/core_ext/object/blank' module ActiveModel class Name < String - attr_reader :singular, :plural, :element, :collection, :partial_path, + attr_reader :singular, :plural, :element, :collection, :singular_route_key, :route_key, :param_key, :i18n_key alias_method :cache_key, :collection - deprecate :partial_path => "ActiveModel::Name#partial_path is deprecated. Call #to_partial_path on model instances directly instead." - def initialize(klass, namespace = nil, name = nil) name ||= klass.name @@ -27,7 +25,6 @@ module ActiveModel @element = ActiveSupport::Inflector.underscore(ActiveSupport::Inflector.demodulize(self)).freeze @human = ActiveSupport::Inflector.humanize(@element).freeze @collection = ActiveSupport::Inflector.tableize(self).freeze - @partial_path = "#{@collection}/#{@element}".freeze @param_key = (namespace ? _singularize(@unnamespaced) : @singular).freeze @i18n_key = self.underscore.to_sym |