Sha256: b5ff492abbfdd50e76f0ea0a7f3a861df035e399a5d247e2006f45e1f06dd6f4
Contents?: true
Size: 587 Bytes
Versions: 7
Compression:
Stored size: 587 Bytes
Contents
require "ember_cli/constraint" module ActionDispatch module Routing class Mapper def mount_ember_app(app_name, to:, **options) routing_options = options.deep_merge( defaults: { ember_app: app_name }, ) routing_options.reverse_merge!( controller: "ember_cli/ember", action: "index", format: :html, ) Rails.application.routes.draw do scope constraints: EmberCli::Constraint.new do get("#{to}(*rest)", routing_options) end end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems