Slava Mikerin wrote in post #1022739:
> Hello,
> I wonder how to tell my routes.rb to route requests to a resource to
> it's parent controller
>
> class Foo < Bar
> end
>
>
> resources :foos ===> controller :bars
resources :foos, :controller => :bars
--
Posted via http://www.ruby-forum.com/.
-
Check out the guide for routing, especially the part on "specifying a
controller to use" under "customizing restful resources"
http://guides.rubyonrails.org/routing.html#customizing-resourceful-routes
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails:
h,
That's what I do to fix my routing.
I guess that my question generated a little confusion ;/. Sorry for
any incovenience
Thx all
--
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
On Sep 1, 7:03 am, 7stud -- wrote:
> Conrad Taylor wrote in post #1019592:
>
> > On Thu, Sep 1, 2011 at 1:53 AM, 7stud -- wrote:
>
> >> > The above can easily be fixed by adding a $ after the *. For example,
>
> >> > /^[1-9]\d*$/
>
> >> Why do you continue to claim that you can use anchors in a
Bruno Meira wrote in post #1019487:
> Hi 7stud,
> I wanted a URL like that: /users/:id, where :id could only be one or
> more integers, actually the user id.
>
What is it that you find lacking in the normal rails routing, e.g.
resources :users
that requires you to change it?
--
Posted via http
Bruno Meira wrote in post #1019487:
> Hi 7stud,
> I wanted a URL like that: /users/:id, where :id could only be one or
> more integers, actually the user id.
> I don't have in mind any case that this line could'nt be resolve.
> Could you give me an example?
> Thx ;D
Sure, your route+constraint mat
On Wed, Aug 31, 2011 at 3:07 PM, Bruno Meira wrote:
> Hi 7stud,
> I wanted a URL like that: /users/:id, where :id could only be one or
> more integers, actually the user id.
> I don't have in mind any case that this line could'nt be resolve.
> Could you give me an example?
> Thx ;D
>
>
If this is
Hi 7stud,
I wanted a URL like that: /users/:id, where :id could only be one or
more integers, actually the user id.
I don't have in mind any case that this line could'nt be resolve.
Could you give me an example?
Thx ;D
--
You received this message because you are subscribed to the Google Groups "
First, why don't you actually give an example of the url you want to map
to the show action???
Second, that regex does not meet your requirements. You may think it
works well, but that just means you didn't test it well enough.
--
Posted via http://www.ruby-forum.com/.
--
You received this
My constraint stayed like that: :constraints => { :id => /
[1-9]\d*/ }
--
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 t
I do like Conrad said and the code works well.
Thx ;D
--
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+
On Wed, Aug 31, 2011 at 12:01 PM, Conrad Taylor wrote:
> On Wed, Aug 31, 2011 at 7:51 AM, 7stud -- wrote:
>
>> Conrad Taylor wrote in post #1019393:
>> > On Wed, Aug 31, 2011 at 7:04 AM, Bruno Meira
>> > wrote:
>> >
>> >>
>> > Bruno, I would recommend reading section 4.2 of the Rails routing gu
On Wed, Aug 31, 2011 at 7:51 AM, 7stud -- wrote:
> Conrad Taylor wrote in post #1019393:
> > On Wed, Aug 31, 2011 at 7:04 AM, Bruno Meira
> > wrote:
> >
> >>
> > Bruno, I would recommend reading section 4.2 of the Rails routing guide:
> >
>
> I read that, and I don't see how applying a regex to
Hi All,
Thanks for answer my question.
I read http://guides.rubyonrails.org/routing.html#segment-constraints
and I guess that the best way to resolve my problem is do like Jim
said, put the route in match and add except constraint in resource.
Thanks All ;D
--
You received this message because yo
On Wed, Aug 31, 2011 at 10:51 PM, 7stud -- wrote:
> Conrad Taylor wrote in post #1019393:
> > On Wed, Aug 31, 2011 at 7:04 AM, Bruno Meira
> > wrote:
> >
> >>
> > Bruno, I would recommend reading section 4.2 of the Rails routing guide:
> >
>
> I read that, and I don't see how applying a regex to
Conrad Taylor wrote in post #1019393:
> On Wed, Aug 31, 2011 at 7:04 AM, Bruno Meira
> wrote:
>
>>
> Bruno, I would recommend reading section 4.2 of the Rails routing guide:
>
I read that, and I don't see how applying a regex to the id will help.
How about adding :show to the :except clause and
7stud -- wrote in post #1019391:
> How about:
>
> match '/:id' => 'users/show'
> resources :users, :except=>[:destroy]
Sorry, that doesn't meet your requirements because both '/1' and
'/show/1' will match.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are
How about:
match '/:id' => 'users/show'
resources :users, :except=>[:destroy]
--
Posted via http://www.ruby-forum.com/.
--
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.
Sorry for this post--this of course turned out to be a phusion/apache
configuration issue. Mea culpa. Although it's really teaching me how
important restful routes are :)
Craig
On Feb 20, 5:50 pm, Dudebot wrote:
> I'm pushing my rails app to a server. My local development machine
> has localho
map.resources :jobs, :as => :alias
Hope that helps!
Tm
On Apr 14, 6:59 am, DanC wrote:
> I have a resource for jobs on my application and I am familiar with
> RESTful routes etc. I am also happy adding some custom routes to my
> controller.
>
> My question is, can I create an alias controller,
20 matches
Mail list logo