Skip to content

Instantly share code, notes, and snippets.

@chendo
Created June 5, 2011 08:02
Show Gist options
  • Select an option

  • Save chendo/1008756 to your computer and use it in GitHub Desktop.

Select an option

Save chendo/1008756 to your computer and use it in GitHub Desktop.
class Car < ActiveRecord::Base
validates_length_of :name, :range => 2..10
validates_precense_of :name
has_many :purchases
has_many :owners, :through => :purchases
def normal_method
"blah blah blah"
end
protected
def this_is_still_a_class_etc
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment