oooh!! I'm very sorry I've completly forgotten to translate....
-->@file = File.find_all_by_mandant_id(@invoice.mandant_id)
@slip = Slip.find_all_by_file_id (@file, :conditions =>
{:invoice_id => 'NULL'})
No, I don't have any validations done at the moment due to the fact
that they could produce errors.
Well the realtions are quiet simple:
1)class Slip < ActiveRecord::Base
belongs_to :invoice
belongs_to :mandant
2) class Invoice < ActiveRecord::Base
has_many :slips
belongs_to :mandant
3) class Akte < ActiveRecord::Base
belongs_to :mandant
has_many :slips
has_many :invoice, :through => :slips
4)class Mandant < ActiveRecord::Base
has_many :files
has_many :invoices
has_many :slips, :through => :aktes
So you said that the invoice.id must be saved before I can actually
start working with it no??
-->Therefore I should locate my find methods and the loop in the
controller's def creat. Because that would mean that the invoce.id
I've choosen earlier from my selection box has allready been saved,
no??
thank you!
p.s.:the shallow understanding might be because I'm quite new to ruby
on rails ; )
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---