Created
November 16, 2010 12:36
-
-
Save madhums/701762 to your computer and use it in GitHub Desktop.
User model
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
#/app/models/user.rb | |
class User < ActiveRecord::Base | |
has_many :authorizations, :dependent => :destroy | |
def self.create_from_hash(hash) | |
create(:username => hash['user_info']['name']) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment