Skip to content

Instantly share code, notes, and snippets.

@russ
Created April 26, 2013 19:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save russ/5469630 to your computer and use it in GitHub Desktop.
Save russ/5469630 to your computer and use it in GitHub Desktop.
class Seller < ActiveRecord::Base
has_one :business
accepts_nested_attributes_for :business
devise :database_authenticatable, :registerable, :token_authenticatable,
:lockable, :timeoutable, :recoverable, :rememberable, :trackable, :validatable
attr_accessible :email, :password, :last_name, :first_name, :remember_me, :business_attributes
def connect_stripe(hash)
update_attribute(:stripe_access_token, hash['credentials']['token'])
update_attribute(:stripe_publishable_key, hash['info']['stripe_publishable_key'])
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment