diff options
author | José Valim <jose.valim@gmail.com> | 2012-03-23 05:57:35 -0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2012-03-23 05:57:35 -0700 |
commit | 35e8de63446562b2e50784e99626a602c65f90ad (patch) | |
tree | f96547d6c669b1b7adc2fe98f4166c44fdf1d6c0 /activemodel/lib | |
parent | d1887d384a4038d67bcad50a46a6dc67abfebe04 (diff) | |
parent | bf8d7574bfb80b44ba353bf055122efbaa3d57da (diff) | |
download | rails-35e8de63446562b2e50784e99626a602c65f90ad.tar.gz rails-35e8de63446562b2e50784e99626a602c65f90ad.tar.bz2 rails-35e8de63446562b2e50784e99626a602c65f90ad.zip |
Merge pull request #5374 from nertzy/remove_deprecated_partial_path_from_active_model_naming
Remove ActiveModel::Naming#partial_path
Diffstat (limited to 'activemodel/lib')
-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 |