Skip to content

Instantly share code, notes, and snippets.

@benphelps
Created November 9, 2012 21:16
Show Gist options
  • Save benphelps/4048325 to your computer and use it in GitHub Desktop.
Save benphelps/4048325 to your computer and use it in GitHub Desktop.
class Wallet < ActiveRecord::Base
attr_accessible :cents, :margin_cents
belongs_to :user
def equity
margin + cash + user.stocks.mark_value
end #^
# \ This is what I need access to
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment