Skip to content

Instantly share code, notes, and snippets.

@nachof
Forked from EmmanuelOga/gist:264690
Created December 28, 2009 20:28
Show Gist options
  • Save nachof/264915 to your computer and use it in GitHub Desktop.
Save nachof/264915 to your computer and use it in GitHub Desktop.
class Model < AR::Base
CONSTANT = "K"
named_scope :my_grandma, lambda { blah! }
belongs_to :something
attr_wicked :column
attr_accessible :col2
attr_protected :col3
validates_presence_of awesomeness, :with => CONSTANT
def validate
# Some weird validation
end
before_save :save_myself
extend ClassMethods
include InstanceMethods
concerned_with :something
def self.class_method
end
def method
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment