Sha256: 5e71abe02536162903050d750bd7618bfb14a6206a97bfa6698e7c1d43b6525b
Contents?: true
Size: 307 Bytes
Versions: 7
Compression:
Stored size: 307 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.permit(:name, :type)) end end
Version data entries
7 entries across 7 versions & 1 rubygems