Ruby on Rails Wednesday, January 13, 2016

A for person, C for organization, which means they both have names.

Like, a person called John Terry, and he is affiliated to three organizations called Chelsea FC, London Something, and UK Good Football Player. ( I made up the other two org.)

So now if users want to find out some people that belong to these three organizations simultaneously, enter "Chelsea FC, London Something, UK Good Football Player", system will show John Terry and other people who might meat this criteria as well. 

Hope this time I make myself clear. 

Thank you for your time.

On Wednesday, January 13, 2016 at 10:32:49 PM UTC+8, Colin Law wrote:
On 13 January 2016 at 14:20, Lei Zhang <ray.zh...@gmail.com> wrote:
> My mistake not making it clear enough.
>
> Actually they have some attributes.
>
> Let's say,
>
> A has a simple attribute called A.name and C also has a attribute C.name.
>
> Then A has_many C, which means C.a_id exists.
>
> In my case, my requirement is that if users enter C2.name、 C3.name and
> C4.name, I should show them A1.name or whatever attributes A might have that
> needs to be displayed.

No, still not getting it.  When you say user enters C2.name, C3.name
and C4.name do you mean he actually enters the string "C2.name,
C3.name and C4.name" or do you mean he enters actual names or what?
Please give an example of actual records and their fields and values
and exactly what the user might enter and what you want to show.

Colin

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/58401e51-0c95-42f3-86b3-56a7ba4cba9f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment