diff options
author | aditya-kapoor <aditya.kapoor@vinsol.com> | 2013-12-10 11:44:07 +0530 |
---|---|---|
committer | aditya-kapoor <aditya.kapoor@vinsol.com> | 2013-12-10 11:44:07 +0530 |
commit | 0c55335074ed7baf2f165ada168f726f1f7bba68 (patch) | |
tree | 2a8428d72f6890cb0eb6c5b9b1d40b7b2ce93d8b /activemodel/lib/active_model/naming.rb | |
parent | 6b9b0767bf480d53029afeb3f8e86f66e933fb41 (diff) | |
parent | fe077b50c9ce65c4ac1cc718c34dda45cd24c6fe (diff) | |
download | rails-0c55335074ed7baf2f165ada168f726f1f7bba68.tar.gz rails-0c55335074ed7baf2f165ada168f726f1f7bba68.tar.bz2 rails-0c55335074ed7baf2f165ada168f726f1f7bba68.zip |
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'activemodel/lib/active_model/naming.rb')
-rw-r--r-- | activemodel/lib/active_model/naming.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/activemodel/lib/active_model/naming.rb b/activemodel/lib/active_model/naming.rb index bc9edf4a56..11ebfe6cc0 100644 --- a/activemodel/lib/active_model/naming.rb +++ b/activemodel/lib/active_model/naming.rb @@ -262,10 +262,10 @@ module ActiveModel # namespaced models regarding whether it's inside isolated engine. # # # For isolated engine: - # ActiveModel::Naming.singular_route_key(Blog::Post) #=> post + # ActiveModel::Naming.singular_route_key(Blog::Post) # => "post" # # # For shared engine: - # ActiveModel::Naming.singular_route_key(Blog::Post) #=> blog_post + # ActiveModel::Naming.singular_route_key(Blog::Post) # => "blog_post" def self.singular_route_key(record_or_class) model_name_from_record_or_class(record_or_class).singular_route_key end @@ -274,10 +274,10 @@ module ActiveModel # namespaced models regarding whether it's inside isolated engine. # # # For isolated engine: - # ActiveModel::Naming.route_key(Blog::Post) #=> posts + # ActiveModel::Naming.route_key(Blog::Post) # => "posts" # # # For shared engine: - # ActiveModel::Naming.route_key(Blog::Post) #=> blog_posts + # ActiveModel::Naming.route_key(Blog::Post) # => "blog_posts" # # The route key also considers if the noun is uncountable and, in # such cases, automatically appends _index. @@ -289,10 +289,10 @@ module ActiveModel # namespaced models regarding whether it's inside isolated engine. # # # For isolated engine: - # ActiveModel::Naming.param_key(Blog::Post) #=> post + # ActiveModel::Naming.param_key(Blog::Post) # => "post" # # # For shared engine: - # ActiveModel::Naming.param_key(Blog::Post) #=> blog_post + # ActiveModel::Naming.param_key(Blog::Post) # => "blog_post" def self.param_key(record_or_class) model_name_from_record_or_class(record_or_class).param_key end |