Skip to content

@bryanl /cow.rb
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
class Cow < ActiveRecord::Base
def milk
milk_with MilkingMachine.next_available
end
end
class KineController < ApplicationController
def milk
cow = Cow.find params[:id]
if cow.milk
render :status => 200, :text => "milked"
else
render :status => 401, :text => "unable to milk"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.