Created
May 13, 2012 16:51
-
-
Save karthiks/2689276 to your computer and use it in GitHub Desktop.
Implementation without StringInquirer
This file contains hidden or 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 User < ActiveRecord::Base | |
has_one user_profile, :dependent => :destroy | |
def admin? | |
user.user_profile.type.titleize == "Admin" | |
end | |
def exhibition_curator? | |
user.user_profile.type.titleize == "Exhibition Curator" | |
end | |
def estate? | |
user.user_profile.type.titleize == "Estate" | |
end | |
def artist? | |
user.user_profile.type.titleize == "Artist" | |
end | |
def collector? | |
user.user_profile.type.titleize == "Collector" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment