Sha256: 7f637b25bba07541747f1c95ffb1248610d06e48c3ba2a0d47c43dbd06040b69
Contents?: true
Size: 306 Bytes
Versions: 21
Compression:
Stored size: 306 Bytes
Contents
class RecipesController < ApplicationController validates :create do string :name, required: true, except: %w[alice bob] integer :type, only: 1..3 end def show render json: Recipe.find(params[:id]) end def create respond_with Recipe.create(params.slice(:name, :type)) end end
Version data entries
21 entries across 21 versions & 1 rubygems