Sha256: 0a8b53fd24ab19c80c83168fd01d49f88c28eedf1267674d992bccfc1121067a
Contents?: true
Size: 306 Bytes
Versions: 12
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 respond_with Recipe.find(params[:id]) end def create respond_with Recipe.create(params.slice(:name, :type)) end end
Version data entries
12 entries across 12 versions & 1 rubygems