Sha256: c01e9be4a35ab95f42376172bfe9cf21d9e75a73f4692b57ca5740c0704a80d9
Contents?: true
Size: 970 Bytes
Versions: 3
Compression:
Stored size: 970 Bytes
Contents
module ActionDispatch::Routing class Mapper # Enables routes for Netzke assets and endpoint calls (by default routes to NetzkeController). The default URL is "/netzke", but this can be changed: # # netzke "/some/path/netzke" # # If you want to use your own controller instead of NetzkeController, you can specify it like this: # # netzke "/netzke", controller: :admin # # This will make Netzke use AdminController. Note, that in that case AdminController MUST implement the actions required by Netzke. The way to do this is to include Netzke::Railz::ControllerExtensions in your controller, e.g.: # # class AdminController < ApplicationController # include Netzke::Railz::ControllerExtensions # end def netzke(prefix = "/netzke", options = {}) controller = options[:controller] || :netzke match "#{prefix}/:action(.:format)", to: controller.to_s, as: 'netzke' end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
netzke-core-0.8.4 | lib/netzke/core/railz/routes.rb |
netzke-core-0.8.3 | lib/netzke/core/railz/routes.rb |
netzke-core-0.8.2 | lib/netzke/core/railz/routes.rb |