diff options
author | José Valim <jose.valim@gmail.com> | 2011-08-01 11:42:00 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-08-01 11:42:00 +0200 |
commit | dc8773b19f61af2ba818d66923fc65e17bad6c20 (patch) | |
tree | bfc4089cd48db0caeddd550dc56db49b799ee1e0 /activemodel/lib/active_model/lint.rb | |
parent | d701b3fa470b53a56da131cf64b96e411178bc08 (diff) | |
download | rails-dc8773b19f61af2ba818d66923fc65e17bad6c20.tar.gz rails-dc8773b19f61af2ba818d66923fc65e17bad6c20.tar.bz2 rails-dc8773b19f61af2ba818d66923fc65e17bad6c20.zip |
Rename new method to_path to to_partial_path to avoid conflicts with File#to_path and similar.
Diffstat (limited to 'activemodel/lib/active_model/lint.rb')
-rw-r--r-- | activemodel/lib/active_model/lint.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activemodel/lib/active_model/lint.rb b/activemodel/lib/active_model/lint.rb index 08c2e5fcf3..bfe7ea1869 100644 --- a/activemodel/lib/active_model/lint.rb +++ b/activemodel/lib/active_model/lint.rb @@ -43,14 +43,14 @@ module ActiveModel assert model.to_param.nil?, "to_param should return nil when `persisted?` returns false" end - # == Responds to <tt>to_path</tt> + # == Responds to <tt>to_partial_path</tt> # # Returns a string giving a relative path. This is used for looking up # partials. For example, a BlogPost model might return "blog_posts/blog_post" # - def test_to_path - assert model.respond_to?(:to_path), "The model should respond to to_path" - assert_kind_of String, model.to_path + def test_to_partial_path + assert model.respond_to?(:to_partial_path), "The model should respond to to_partial_path" + assert_kind_of String, model.to_partial_path end # == Responds to <tt>valid?</tt> |