Sha256: cc2517ee07acc715648ec8f05c50417f838880c84a234d9a042eedc58f18f68a

Contents?: true

Size: 1.23 KB

Versions: 22

Compression:

Stored size: 1.23 KB

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

      get "#{prefix}" => "#{controller.to_s}#index", as: :netzke
      get "#{prefix}/ext(.:format)" => "#{controller.to_s}#ext", as: :netzke_ext
      match "#{prefix}/direct" => "#{controller.to_s}#direct", as: :netzke_direct, via: [:get, :post]
      match "#{prefix}/dispatcher" => "#{controller.to_s}#dispatcher", as: :netzke_dispatcher, via: [:get, :post]
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
netzke-core-6.5.0.0 lib/netzke/core/railz/routes.rb
netzke-core-6.5.0.0.rc2 lib/netzke/core/railz/routes.rb
netzke-core-6.5.0.0.rc1 lib/netzke/core/railz/routes.rb
netzke-core-1.0.1.0 lib/netzke/core/railz/routes.rb
netzke-core-1.0.0.0 lib/netzke/core/railz/routes.rb
netzke-core-1.0.0.0.pre4 lib/netzke/core/railz/routes.rb
netzke-core-1.0.0.0.pre3 lib/netzke/core/railz/routes.rb
netzke-core-1.0.0.0.pre2 lib/netzke/core/railz/routes.rb
netzke-core-1.0.0.0.pre lib/netzke/core/railz/routes.rb
netzke-core-0.12.3 lib/netzke/core/railz/routes.rb
netzke-core-0.12.2 lib/netzke/core/railz/routes.rb
netzke-core-0.12.1 lib/netzke/core/railz/routes.rb
netzke-core-0.12.0 lib/netzke/core/railz/routes.rb
netzke-core-0.12.0.rc1 lib/netzke/core/railz/routes.rb
netzke-core-0.12.0.beta lib/netzke/core/railz/routes.rb
netzke-core-0.11.0 lib/netzke/core/railz/routes.rb
netzke-core-0.10.1 lib/netzke/core/railz/routes.rb
netzke-core-0.10.0 lib/netzke/core/railz/routes.rb
netzke-core-0.9.0 lib/netzke/core/railz/routes.rb
netzke-core-0.10.0.rc2 lib/netzke/core/railz/routes.rb