> One last question.
> I need the description for the manufacturer that is found in the table 
> descriptions. How do I get this columns info and how do I access it in 
> the view?
> 
> Thank you in advance

With this one:
> find(:all, :joins => :descriptions, :order => :name, :conditions => 
> {:descriptions => {:locale => I18n.locale}})
since you descript your associations you can get manufacturers with all 
associated models, then you can use it anywhere

Like this one for example:

@manufacturers = Manufacturer.all :joins => :description, :order => 
:name, :conditions => {:descriptions => {:locale => I18n.locale}}

@manufacturers.each do |manufacturer|
  puts manufacturer.description.description
end

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