aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/conversion.rb
diff options
context:
space:
mode:
authorOlli Jokinen <olli.jokinen@enemy.fi>2011-12-01 15:32:59 +0200
committerOlli Jokinen <olli.jokinen@enemy.fi>2011-12-01 15:32:59 +0200
commitb4e1903d23a760028d58bc3bb20a1d491bfd4a4b (patch)
treea40bdce1bd4800124ab6eaed2a6be017bf9cfd3d /activemodel/lib/active_model/conversion.rb
parentfae9ad9c712decef70b379f5aa1faa0149902831 (diff)
parent1e51cd957e3c90f4be35f1f0c4c380d8f7d40d66 (diff)
downloadrails-b4e1903d23a760028d58bc3bb20a1d491bfd4a4b.tar.gz
rails-b4e1903d23a760028d58bc3bb20a1d491bfd4a4b.tar.bz2
rails-b4e1903d23a760028d58bc3bb20a1d491bfd4a4b.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'activemodel/lib/active_model/conversion.rb')
-rw-r--r--activemodel/lib/active_model/conversion.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/activemodel/lib/active_model/conversion.rb b/activemodel/lib/active_model/conversion.rb
index 39977f12c3..80a3ba51c3 100644
--- a/activemodel/lib/active_model/conversion.rb
+++ b/activemodel/lib/active_model/conversion.rb
@@ -4,7 +4,7 @@ require 'active_support/inflector'
module ActiveModel
# == Active Model Conversions
#
- # Handles default conversions: to_model, to_key, to_param, and to_path.
+ # Handles default conversions: to_model, to_key, to_param, and to_partial_path.
#
# Let's take for example this non-persisted object.
#
@@ -54,15 +54,15 @@ module ActiveModel
# Returns a string identifying the path associated with the object.
# ActionPack uses this to find a suitable partial to represent the object.
- def to_path
- self.class._to_path
+ def to_partial_path
+ self.class._to_partial_path
end
module ClassMethods #:nodoc:
# Provide a class level cache for the to_path. This is an
# internal method and should not be accessed directly.
- def _to_path #:nodoc:
- @_to_path ||= begin
+ def _to_partial_path #:nodoc:
+ @_to_partial_path ||= begin
element = ActiveSupport::Inflector.underscore(ActiveSupport::Inflector.demodulize(self))
collection = ActiveSupport::Inflector.tableize(self)
"#{collection}/#{element}".freeze