Sha256: 62857ccabdfca85db2d9f83f5ec6af8733aadf3710ed735613c12af51957fabc
Contents?: true
Size: 544 Bytes
Versions: 2
Compression:
Stored size: 544 Bytes
Contents
module Para class Routes attr_reader :router def initialize(router) @router = router end def draw(mount_location = '/', &block) router.instance_eval do scope mount_location do scope module: :para do namespace :admin do get '/' => 'main#index' crud_component :crud, scope: ':model' singleton_resource_component :singleton, scope: ':model' end end block.call if block end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
para-0.5.1 | lib/para/routes.rb |
para-0.5.0 | lib/para/routes.rb |