On 26 April 2011 23:35, femig
<georgefemi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> hello,
>
> i have a basic rails 3 question..
>
> i have a list of jobs in my db and each job is tied to a particular
> location..in short i have one location to many jobs..
>
> i have created scaffolding for jobs and locations and created the
> appropriate references.
>
> i want to create a list of jobs such that when i click on one of the
> jobs, i get to see a list of all the jobs in that location.
I am not sure which bit you are having difficulty with. If you have a
job in @job then its location is @job.location and all the jobs for
that location are @job.location.jobs.
Colin
--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.