Created
July 31, 2012 06:37
-
-
Save tjarmain/3214287 to your computer and use it in GitHub Desktop.
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
class Stock < ActiveRecord::Base | |
attr_accessible :issuer, :portfolio_id | |
has_many :portfolios_stocks | |
has_many :portfolios, :through => :portfolios_stocks | |
end | |
class Portfolio < ActiveRecord::Base | |
attr_accessible :fund_id, :period | |
belongs_to :fund | |
has_many :portfolios_stocks | |
has_many :stocks, :through => :portfolios_stocks | |
end | |
class Fund < ActiveRecord::Base | |
attr_accessible :name | |
has_many :portfolios | |
end |
certainty
commented
Jul 31, 2012
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment