[Rails] Re: Rails 3 routes.

2012-01-20 Thread Tim Shaffer
It depends how you generate the controller. If you use a command like this: rails g controller posts index show edit new update create destroy It will indeed create a GET route for each action. Kind of annoying. You can generate the restful controller and route declaration by using the followin

[Rails] Re: Rails 3 routes with same name, different param name based on constraint

2011-10-06 Thread Tim Shaffer
Seems like it would be a lot easier to just have the logic in the controller. Right now you have the logic in the routes, then you'll also need logic in the controller to check whether params[:id] or params[:site_photo_id] exists. If you have just one route and move the logic to the controlle

[Rails] Re: Rails 3 routes with same name, different param name based on constraint

2011-10-06 Thread Dan Sadaka
Kleber Shimabuku wrote in post #1025300: > Hi, > > What about to create a default route and just let the manage with the > controller? > > Is it too wrong? I want the parameter name to correctly identify the source of the image so the controller knows where to get it. thx, D -- Posted via http

[Rails] Re: Rails 3 routes with same name, different param name based on constraint

2011-10-06 Thread Kleber Shimabuku
Hi, What about to create a default route and just let the manage with the controller? Is it too wrong? On Oct 6, 7:24 am, Dan Sadaka wrote: > Hello there fellow RoR enthusiasts, > > I have been wrestling with rails 3 routes for hours trying to accomplish > the following: > > I want to use the

[Rails] Re: rails 3 routes alias

2011-03-09 Thread Felipe Espinoza Castillo
try this out get "welcome/operations", as: :operations and check the comments in your config/routes.rb file -- 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 unsubs

[Rails] Re: rails 3 routes

2010-12-21 Thread Mike C
After a few days of experimenting I think I got it fixed. All I did was make the search variable optional, and removing it also does the trick. On Dec 20, 10:58 pm, daze wrote: > On Dec 20, 9:13 pm, Marnen Laibow-Koser wrote: > > > Well, you didn't quote the lines you were replying to, and you d

[Rails] Re: rails 3 routes

2010-12-20 Thread daze
On Dec 20, 9:13 pm, Marnen Laibow-Koser wrote: > Well, you didn't quote the lines you were replying to, and you didn't > state what you were wondering...so I'm left wondering how to read your > mind. :D > > In future, please just ask what you need to ask. > > Best, > -- > Marnen Laibow-Koserhttp:/

[Rails] Re: rails 3 routes

2010-12-20 Thread Marnen Laibow-Koser
daze wrote in post #969695: > I'm wondering about something along these lines too... Well, you didn't quote the lines you were replying to, and you didn't state what you were wondering...so I'm left wondering how to read your mind. :D In future, please just ask what you need to ask. Best,

[Rails] Re: rails 3 routes

2010-12-20 Thread daze
I'm wondering about something along these lines too... -- 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-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-