Created
December 16, 2009 22:53
-
-
Save MarkMenard/258290 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Member < ActiveRecord::Base | |
class << self | |
def new (attributes = nil, &block) | |
if self == Member | |
klass = Object.const_get("#{(ENV['MORI_ENV'] ? ENV['MORI_ENV'] : "").camelize}Member".to_sym) | |
if klass != Member | |
return klass.new(attributes, &block) | |
end | |
end | |
super | |
end | |
end | |
def hi | |
"Regular Member" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment