method
singular_route_key
v4.0.2 -
Show latest stable
- Class:
ActiveModel::Naming
singular_route_key(record_or_class)public
Returns string to use while generating route names. It differs for namespaced models regarding whether it’s inside isolated engine.
# For isolated engine: ActiveModel::Naming.singular_route_key(Blog::Post) #=> post # For shared engine: ActiveModel::Naming.singular_route_key(Blog::Post) #=> blog_post