Skip to content

Instantly share code, notes, and snippets.

@dangjlin
Last active August 29, 2015 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dangjlin/212c62acbb5521433aa3 to your computer and use it in GitHub Desktop.
Save dangjlin/212c62acbb5521433aa3 to your computer and use it in GitHub Desktop.
module ActiveRecord
module Validations
#...
def self.included(base)
base.extend ClassMethods
#...
end
module ClassMethods
def validates_length_of(*attrs)#...
#...
end
def valid?
#...
end
#...
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment