aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2012-03-23 05:57:35 -0700
committerJosé Valim <jose.valim@gmail.com>2012-03-23 05:57:35 -0700
commit35e8de63446562b2e50784e99626a602c65f90ad (patch)
treef96547d6c669b1b7adc2fe98f4166c44fdf1d6c0 /activemodel/lib/active_model
parentd1887d384a4038d67bcad50a46a6dc67abfebe04 (diff)
parentbf8d7574bfb80b44ba353bf055122efbaa3d57da (diff)
downloadrails-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/active_model')
-rw-r--r--activemodel/lib/active_model/naming.rb5
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