Forum: Ruby on Rails "map.resources " problem

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
3d9e26d3be3e7fcf93aca6574bc77a20?d=identicon&s=25 Tushar Gandhi (gandhi-tush)
on 2009-04-14 14:37
Hi,

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.

Thanks,
Tushar
80e4cb97cae5c8d745f72337d93fd8f2?d=identicon&s=25 MaD (Guest)
on 2009-04-14 14: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.
4c438a80fc30661ad619ea177cf9cbd0?d=identicon&s=25 Freddy Andersen (Guest)
on 2009-04-14 15:43
(Received via mailing list)
map.resources :accounts, :member => { :select_photo => :get } ???
This topic is locked and can not be replied to.