i have a model :user with an association has_many :langs.
table langs have fields title and langcode.
In practice every users have many langs, i retrieve specific lang with
the langcode (en, de, fr, it, es, etc.)
Now i want to display list users with the only default lang (en), i have
used this query:
@users = User.find(:all, :include => :langs)
and on wiew this:
<% for item in @users %>
<td><%=h item.langs.first.title %></td>
<td><%=h item.langs.first.langcode %></td>
<% end %>
but this don''t display selected items by default value langcode
("en").
how can i select only the "en" langcode from my query?
--
Posted via http://www.ruby-forum.com/.