aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-11-02 14:46:56 -0200
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-11-02 14:46:56 -0200
commitdeaf285824fa7d2aaf24619eefdb0893c0069bc0 (patch)
tree5dc700b9179f923b841d77efc336dcc67e906add /activemodel/lib
parentc2b5a8e61ba0f35015e6ac949a5c8fce2042a1f2 (diff)
parentfb6f02c521b87c749757eb3260e4bfa120fc7c32 (diff)
downloadrails-deaf285824fa7d2aaf24619eefdb0893c0069bc0.tar.gz
rails-deaf285824fa7d2aaf24619eefdb0893c0069bc0.tar.bz2
rails-deaf285824fa7d2aaf24619eefdb0893c0069bc0.zip
Merge pull request #12686 from kryzhovnik/master
Minor doc fix of ActiveModel::Naming. [ci skip] Conflicts: activemodel/lib/active_model/naming.rb
Diffstat (limited to 'activemodel/lib')
-rw-r--r--activemodel/lib/active_model/naming.rb12
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..198efc5088 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