Module: InertiaRails::InertiaMapper
- Defined in:
- lib/inertia_rails/extensions/mapper.rb
Instance Method Summary collapse
Instance Method Details
#inertia(*args, **options) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/inertia_rails/extensions/mapper.rb', line 5 def inertia(*args, **) defaults = .delete(:defaults) || {} defaults = defaults.merge(props: .delete(:props)) if .key?(:props) extract_routes(args, ).each do |route, component| get(route, to: StaticController.action(:static), defaults: defaults.merge(component: component), **) end end |