Sha256: 0ec6cd5b9e246566f8a3a8ff8204aafb0f6828ef3d0cda9806ed963056c4f77b

Contents?: true

Size: 687 Bytes

Versions: 2

Compression:

Stored size: 687 Bytes

Contents

Rails.application.routes.draw do
  mount ApiTaster::Engine => "/api_taster"

  get 'home' => 'application#home', :as => :home
  match 'custom' => 'application#home', :via => [:get, :delete]

  resources :users, :except => [:new, :edit] do
    resources :comments, :only => [:new, :edit]
  end
end

ApiTaster.routes do
  get '/i_dont_exist_anymore', {
    :hello => 'world'
  }

  get '/users'

  post '/users', {
    :user => {
      :name => 'Fred',
      :comment => {
        :title => [1, 2, 3]
      }
    }
  }

  get '/users/:id', {
    :id => 1
  }

  put '/users/:id', {
    :id => 1, :user => {
      :name => 'Awesome'
    }
  }

  delete '/users/:id', {
    :id => 1
  }
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
api_taster-0.4.7 spec/dummy/config/routes.rb
api_taster-0.4.6 spec/dummy/config/routes.rb