On Wed, 11 Mar 2009 18:12:12 +0100
Heinz Strunk <rails-mailing-l...@andreas-s.net> wrote:

> I'm having trouble selecting only some specific resources from 2 tables.
> That's my code:
> categories = %w{cat1 cat2 cat3}
> categories.each { |category|
>   cat = CharacterAttributeCategory.find_by_name category
>   @character_attribute_types +=
> CharacterAttributeType.find_all_by_character_attribute_category_id
> cat.id
> }

Do you mean this?

@character_attribute_types = []
@character_attribute_types << 
CharacterAttributeType.find_all_by_character_attribute_category_id

SH

-- 
Starr Horne
My blog: http://starrhorne.com
Check out my Helpdesk RailsKit: http://railskits.com/helpdesk/


--~--~---------~--~----~------------~-------~--~----~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to