method
handle_model
v7.1.3.2 -
Show latest stable
- Class:
ActionDispatch::Routing::PolymorphicRoutes::HelperMethodBuilder
handle_model(record)public
No documentation available.
# File actionpack/lib/action_dispatch/routing/polymorphic_routes.rb, line 263
def handle_model(record)
args = []
model = record.to_model
named_route = if model.persisted?
args << model
get_method_for_string model.model_name.singular_route_key
else
get_method_for_class model
end
[named_route, args]
end