Class: KDomain::Schemas::RailsResource
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- KDomain::Schemas::RailsResource
- Defined in:
- lib/k_domain/schemas/rails_resource.rb
Instance Method Summary collapse
-
#find_model(name) ⇒ Object
def find_route(name) name = name.to_s routes.find { |route| route.name.to_s == name } end.
Instance Method Details
#find_model(name) ⇒ Object
def find_route(name)
name = name.to_s
routes.find { |route| route.name.to_s == name }
end
47 48 49 50 |
# File 'lib/k_domain/schemas/rails_resource.rb', line 47 def find_model(name) name = name.to_s models.find { |model| model.model_name.to_s == name } end |