Skip to content

Instantly share code, notes, and snippets.

@madhums madhums/user.rb
Created Nov 16, 2010

Embed
What would you like to do?
User model
#/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
You can’t perform that action at this time.