Hi there,

I have article display set-up on my side as follows:
map.article 'article/show/:permalink', :controller => 'article', :action 
=> 'show'

So you might be looking for something like this:
map.posts '/posts/:user_id', :controller => 'posts', :action =< 'show'

HTH,
Schalk

Skaurus wrote:
> Hello people :)
> 
> I'm bad in English, so i'll be short. It newbie question, I think)
> 
> In my application I has users, which :has_many => posts. In routes.rb
> I can with ease create routes for posts like /:user_id/posts/..., but
> I wish to have something like /posts/:user_id/... instead. And use
> map.resources syntax to be one-liner, of course :)
> 
> Can I possibly do that?
> 
> Thank in advance!
> 
> > 
> 

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

begin:vcard
fn:Schalk Neethling
n:Neethling;Schalk
org:Overt Strategy Consulting
adr:Florauna;;Berg ave 642;Pretoria;Gauteng;0182;South Africa
email;internet:sch...@overtstrategyconsulting.com
title:President
tel;work:+27125468436
x-mozilla-html:FALSE
url:http://www.overtstrategyconsulting.com
version:2.1
end:vcard

Reply via email to