Sha256: 6372de12fd1dee9f1b313f09fd60bdf1ba263c856973b4266d30f9150055b0aa

Contents?: true

Size: 1.14 KB

Versions: 12

Compression:

Stored size: 1.14 KB

Contents

Apicasso::Engine.routes.draw do
  scope module: :apicasso do
    # When your application needs some kind of custom interaction that is not covered by
    # APIcasso's CRUD approach, you can make your own actions using our base classes and
    # objects to go straight into your logic. If you have built the APIcasso's engine into
    # a route it is important that your custom action takes precedence over the gem's ones.
    # Usage:
    # match ' /: resource /: id / custom-action ' => ' custom # not_a_crud ' , via: :get
    # mount Apicasso :: Engine , em:  " / api / v1 "
    resources :apidocs, only: [:index]
    get '/:resource/', to: 'crud#index', via: :get
    match '/:resource/', to: 'crud#create', via: :post
    get '/:resource/:id', to: 'crud#show', via: :get
    match '/:resource/:id', to: 'crud#update', via: :patch
    match '/:resource/:id', to: 'crud#destroy', via: :delete
    match '/:resource/:id/:nested/', to: 'crud#nested_index', via: :get
    match '/:resource/', to: 'crud#schema', via: :options
    match '/:resource/:id', to: 'crud#schema', via: :options
    match '/:resource/:id/:nested/', to: 'crud#schema', via: :options
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
apicasso-0.6.8 config/routes.rb
apicasso-0.6.7 config/routes.rb
apicasso-0.6.6 config/routes.rb
apicasso-0.6.5 config/routes.rb
apicasso-0.6.4 config/routes.rb
apicasso-0.6.3 config/routes.rb
apicasso-0.6.2 config/routes.rb
apicasso-0.6.1 config/routes.rb
apicasso-0.6.0 config/routes.rb
apicasso-0.5.2 config/routes.rb
apicasso-0.5.1 config/routes.rb
apicasso-0.5.0 config/routes.rb