Hi Eric,
Well, I couldn't make the objects work:
@people_skill = @person.skill
wasn't accepted. I'll keep trying and any suggestions are
appreciated.
Barney
On Jul 19, 10:30 pm, Eric Hu <[email protected]> wrote:
> The original code didn't work because Barney was generating an ActiveRecord
> Relation. The .find almost worked, except he wanted to embed Ruby code in a
> SQL statement. This should do it:
>
> PeopleSkill.where("people_id = #[email protected]}").find
>
> In the future, I think something like Andrew's suggestion would be a lot
> more readable and maintainable--I.E. using ActiveRecord to convert your
> database information into objects, and looking for your information among
> the objects instead of at the database level.
--
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.