Hi,
It seems for the model scenario I have below if there was NO "amount" field
on AiAllocation I could go:
<account item>.business_items << <business item>
QUESTION: What's the easiest way to allocate an account item to a business
item in this case. I really want something like:
<account item>.business_items << <business item>, <AiAllocation amount
value>
*Model Scenario (see below)*
class AccountItem < ActiveRecord::Base
has_many :ai_allocations
has_many :business_items, :through => :ai_allocations
...
class AiAllocation < ActiveRecord::Base
* # Amount field *
belongs_to :account_item
belongs_to :business_item
...
class BusinessItem < ActiveRecord::Base
has_many :ai_allocations
has_many :account_items, :through => :ai_allocations
thanks
--
Greg
http://blog.gregnet.org/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---