Forum: Ruby on Rails "map.resources " problem

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Tushar G. (Guest)
on 2009-04-14 16:37

I am new in rails 2.0 and above. I am using rails 2.2.
I have a mapping "map.resources :accounts" in my routes.rb

I am facing the following problem:
I have following code in my erb file
<a href="accounts/select_photo">Photo 1</a>

Whenever I am clicking on this link I am redirecting to the accounts
show method.
I already added "select_photo"  method in my account controller.
Anyone can help urgent. I stuck due to this.
Also, I am very curious about this issue.
Anyone can explain why it has happened?
Please give me solution for the same.

MaD (Guest)
on 2009-04-14 16:48
(Received via mailing list)
you should read-up on REST.

still (without knowing your code) you can just use routes the old
fashioned style like you used to have them in rails < 2.
Freddy A. (Guest)
on 2009-04-14 17:43
(Received via mailing list)
map.resources :accounts, :member => { :select_photo => :get } ???
This topic is locked and can not be replied to.