Sha256: 377cc1a306eb0be4f39a6511e357dc8f102aff50ca9a583d849da7db13ce4793
Contents?: true
Size: 888 Bytes
Versions: 1
Compression:
Stored size: 888 Bytes
Contents
module ActionDispatch::Routing class Mapper def mount_push_type(options = {}) opts = { path: '/push_type', home: PushType.config.home_node, actions: { node: 'front_end#node' } }.deep_merge!(options) # Mount the PushType engine at the specified path. mount PushType::Core::Engine => opts[:path] # Use a Dragonfly endpoint to provide better URLs for accessing assets get 'media/*file_uid' => Dragonfly.app.endpoint { |params, app| file_name = [ params[:file_uid], params[:format] ].join('.') asset = PushType::Asset.find_by_file_uid! file_name asset.media params[:style] }, as: 'media' # A catch-all root for the nodes get '*permalink' => opts[:actions][:node], as: 'node' root to: opts[:actions][:node], permalink: opts[:home] end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
push_type_core-0.1.1 | lib/push_type/rails/routes.rb |