Sha256: 6423031dd3d14b5baa999839cf72458e5422d94080c5db3100eee3f77adf4336
Contents?: true
Size: 1.02 KB
Versions: 1
Compression:
Stored size: 1.02 KB
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 ApiTaster.global_params = { :version => 1 } get '/i_dont_exist_anymore', { :hello => 'world' } get '/users' post '/users', { :hello => 'world', :user => { :name => 'Fred', :comment => { :title => [1, 2, 3] } }, :items => [ { :name => 'flower', :price => '4.95' }, { :name => 'pot', :price => '2.45' }, { :nested_items => [ { :name => 'apple' }, { :name => 'orange'}, { :nested_numbers => [3, 4, 5] }, { :name => 'banana'} ]} ] } get '/users/:id', { :id => 1 } put '/users/:id', { :id => 1, :user => { :name => 'Awesome' } } delete '/users/:id', { :id => 1 } end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
api_taster-0.4.8 | spec/dummy/config/routes.rb |