mirror of https://github.com/rails/rails
Trivial documentation fix for ActiveModel::Naming comment.
This commit is contained in:
parent
38411b89fc
commit
ba291a67df
|
@ -263,10 +263,10 @@ module ActiveModel
|
||||||
# namespaced models regarding whether it's inside isolated engine.
|
# namespaced models regarding whether it's inside isolated engine.
|
||||||
#
|
#
|
||||||
# # For isolated engine:
|
# # For isolated engine:
|
||||||
# ActiveModel::Naming.route_key(Blog::Post) #=> post
|
# ActiveModel::Naming.singular_route_key(Blog::Post) #=> post
|
||||||
#
|
#
|
||||||
# # For shared engine:
|
# # For shared engine:
|
||||||
# ActiveModel::Naming.route_key(Blog::Post) #=> blog_post
|
# ActiveModel::Naming.singular_route_key(Blog::Post) #=> blog_post
|
||||||
def self.singular_route_key(record_or_class)
|
def self.singular_route_key(record_or_class)
|
||||||
model_name_from_record_or_class(record_or_class).singular_route_key
|
model_name_from_record_or_class(record_or_class).singular_route_key
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue