diff options
author | José Valim <jose.valim@gmail.com> | 2012-03-11 01:17:08 -0800 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2012-03-11 01:17:08 -0800 |
commit | 4d2d0d9906f16a1255e10d55530907318b281c3e (patch) | |
tree | 7db42c6bd33ec91ae4548e3be9af2792881e8f63 | |
parent | 411a8265835971e48f79de9829c5e18e01837395 (diff) | |
parent | e78c5eeba10001223a81203c7b544c09b8394831 (diff) | |
download | rails-4d2d0d9906f16a1255e10d55530907318b281c3e.tar.gz rails-4d2d0d9906f16a1255e10d55530907318b281c3e.tar.bz2 rails-4d2d0d9906f16a1255e10d55530907318b281c3e.zip |
Merge pull request #5373 from nertzy/fix_comments_about_to_partial_path
Fix comments about to_partial_path
-rw-r--r-- | activemodel/lib/active_model/conversion.rb | 4 | ||||
-rw-r--r-- | activemodel/test/cases/conversion_test.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/activemodel/lib/active_model/conversion.rb b/activemodel/lib/active_model/conversion.rb index c7c805f1a2..d7f30f0920 100644 --- a/activemodel/lib/active_model/conversion.rb +++ b/activemodel/lib/active_model/conversion.rb @@ -21,7 +21,7 @@ module ActiveModel # cm.to_model == self # => true # cm.to_key # => nil # cm.to_param # => nil - # cm.to_path # => "contact_messages/contact_message" + # cm.to_partial_path # => "contact_messages/contact_message" # module Conversion extend ActiveSupport::Concern @@ -57,7 +57,7 @@ module ActiveModel end module ClassMethods #:nodoc: - # Provide a class level cache for the to_path. This is an + # Provide a class level cache for #to_partial_path. This is an # internal method and should not be accessed directly. def _to_partial_path #:nodoc: @_to_partial_path ||= begin diff --git a/activemodel/test/cases/conversion_test.rb b/activemodel/test/cases/conversion_test.rb index 24552bcaf2..d679ad41aa 100644 --- a/activemodel/test/cases/conversion_test.rb +++ b/activemodel/test/cases/conversion_test.rb @@ -24,7 +24,7 @@ class ConversionTest < ActiveModel::TestCase assert_equal "1", Contact.new(:id => 1).to_param end - test "to_path default implementation returns a string giving a relative path" do + test "to_partial_path default implementation returns a string giving a relative path" do assert_equal "contacts/contact", Contact.new.to_partial_path assert_equal "helicopters/helicopter", Helicopter.new.to_partial_path, "ActiveModel::Conversion#to_partial_path caching should be class-specific" |