Module: InertiaRails::InertiaMapper

Defined in:
lib/patches/mapper.rb

Instance Method Summary collapse

Instance Method Details

#inertia(*args, **options) ⇒ Object



5
6
7
8
9
# File 'lib/patches/mapper.rb', line 5

def inertia(*args, **options)
  path = args.any? ? args.first : options
  route, component = extract_route_and_component(path)
  get(route, to: StaticController.action(:static), defaults: { component: component }, **options)
end