Sha256: 16d9e720e6528d827ca0a723bd6125f31bc5e2e4ba5437c5e4c01e55293d70c1

Contents?: true

Size: 313 Bytes

Versions: 1

Compression:

Stored size: 313 Bytes

Contents

module InertiaRails
  module InertiaMapper
    def inertia(args, &block)
      route = args.keys.first
      component = args.values.first

      get(route => 'inertia_rails/static#static', defaults: { component: component })
    end
  end
end

ActionDispatch::Routing::Mapper.include InertiaRails::InertiaMapper

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
inertia_rails-3.5.0 lib/patches/mapper.rb