Module: InertiaRails::InertiaMapper

Defined in:
lib/patches/mapper.rb

Instance Method Summary collapse

Instance Method Details

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



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

def inertia(*args, **options)
  path = args.any? ? args.first : options
  route, component = extract_route_and_component(path)
  scope module: nil do
    get(route, to: 'inertia_rails/static#static', defaults: { component: component }, **options)
  end
end