Skip to content

Instantly share code, notes, and snippets.

@EmmanuelOga
Created December 28, 2009 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save EmmanuelOga/264690 to your computer and use it in GitHub Desktop.
Save EmmanuelOga/264690 to your computer and use it in GitHub Desktop.
Model model
class Model < AR::Base
named_scope :my_grandma, lambda { blah! }
belongs_to :something
CONSTANT = "K"
attr_wicked :column
attr_accessible :col2
attr_protected :col3
validates_presence_of awesomeness, :with => CONSTANT
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