Skip to content

Instantly share code, notes, and snippets.

@madhums
Created November 16, 2010 12:36
Show Gist options
  • Save madhums/701762 to your computer and use it in GitHub Desktop.
Save madhums/701762 to your computer and use it in GitHub Desktop.
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