Josh,
I grok what Daniel is trying to say, but I can't tell if you do or
not.  Perhaps this will help.

/mother/273753/child/234
/father/342986/child/234
/child/234

In all of those URLs it is very clear which single resource we are
referencing: Child 234.  But the URLs give very different context
information.  For the first URL, I want to show a pink background, in
the second I want to show a blue background and in the last one, I
want to show a white background, to give a simple example.

Context counts.

Now if we could only get Rails to help us identify that context more
accurately, I'd be happy [warning -going slightly off topic...].

Are these two URLs presenting the same context?

/users/17/groups/2/tags
/groups/2/users/17/tags

Short of routing these URLs to different (otherwise identical)
controllers or manually inspecting the URI, does anybody know how to
differentiate them?

Sure would be nice if Rails exposed the matched route to the
controller!   Perhaps an RO attribute of
ActionController::AbstractRequest set in
ActionController::Routing::RouteSet.recognize?



On Jul 7, 2:37 pm, Josh Peek <[EMAIL PROTECTED]> wrote:
> On Jul 7, 1:22 pm, "Daniel N" <[EMAIL PROTECTED]> wrote:
>
> > I can't pastie it unfortunately but it.  But I believe it goes for any time
> > you use a has_many :through relationship with additional data in the join
> > table.  Without both sides of the join, you can't identify  join, and
> > therefore don't have access to the extra data.
>
> You identify the join with the id of the join model. Thats the purpose
> of using has many though, exposing an actual model. If you could
> pastie on example, I could show you how to model it better.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" 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-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to