File: home_api.rb

package info (click to toggle)
ruby-hashie-forbidden-attributes 0.1.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 244 kB
  • sloc: ruby: 150; makefile: 3
file content (8 lines) | stat: -rw-r--r-- 135 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
require 'grape'
class HomeAPI < Grape::API
  resources :birds do
    post do
      Bird.create!(params.slice(:name))
    end
  end
end