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

Version Path
autodoc-0.3.0 spec/dummy/app/controllers/recipes_controller.rb
autodoc-0.2.8 spec/dummy/app/controllers/recipes_controller.rb
autodoc-0.2.7 spec/dummy/app/controllers/recipes_controller.rb
autodoc-0.2.6 spec/dummy/app/controllers/recipes_controller.rb
autodoc-0.2.5 spec/dummy/app/controllers/recipes_controller.rb
autodoc-0.2.4 spec/dummy/app/controllers/recipes_controller.rb
autodoc-0.2.3 spec/dummy/app/controllers/recipes_controller.rb
autodoc-0.2.2 spec/dummy/app/controllers/recipes_controller.rb
autodoc-0.2.1 spec/dummy/app/controllers/recipes_controller.rb
autodoc-0.2.0 spec/dummy/app/controllers/recipes_controller.rb
autodoc-0.1.9 spec/dummy/app/controllers/recipes_controller.rb
autodoc-0.1.8 spec/dummy/app/controllers/recipes_controller.rb