Sha256: cf9208ccbf0a3339ccd70e64120e594188140b6bd228674eb47d1cf3f91f739f

Contents?: true

Size: 559 Bytes

Versions: 2

Compression:

Stored size: 559 Bytes

Contents

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

  get 'home' => 'application#home', :as => :home

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

ApiTaster.routes do
  get '/users'

  post '/users', {
    :user => {
      :name => 'Fred',
      :comment => {
        :title => 'hi!'
      }
    }
  }

  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.2.2 spec/dummy/config/routes.rb
api_taster-0.2.1 spec/dummy/config/routes.rb