Valli wrote:
> So....let's have a look if I understood the issue:
> 
> -Find_all_by is actually the same like Find(:all), however Find_all_by
> is much shorter and less complicated than the syntax of Find(:all)
> 
You need an instance of the Invoice class, not the class...
Perhaps something like:

@invoice = Invoice.find(params[:id])
@files = File.find_all_by_mandant_id(@invoice.mandant_id )

or

@invoice = Invoice.find(params[:id])
@files = File.find(:all, :conditions => ['mandant_id = ?', 
@invoice.mandant_id])
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to