You have to edit your config/route.rb file.
Add a collection after map.resources :people like the following,
map.resources :people, :collection => { :edit_details => :get }
Then,
map.connect 'people/:id/edit_details', :controller => people, :id => /
\d+/, :action => 'edit_details'
if your id is not an integer, change your /\d+/
Restart your server.
Now, it should work.
I'm also new to rails but that's how I made it work.
May be somebody has a better solution.
Fatou
On Oct 22, 2:50 pm, Yzack <[EMAIL PROTECTED]> wrote:
> Hi everyone !
> I'm new on rails and insoshi
>
> I've created a new method, with same content than the "edit" method
> in people_controller as :
>
> def edit_details
> @person = Person.find(params[:id])
> respond_to do |format|
> format.htm
> end
> end
>
> And i've created a new file view in views/people/ with this name :
> edit_details.html.erb
> In this file, i've simply copy and past the content from the edit.html
> (for testing)
>
> but when i try to access it by this url
> :http://localhost:3000/people/1-admin/edit_details
> i've got this error : "Unknown action No action responded to 1-
> admin"
>
> and when watching log , it seems there is inversion between action and
> id :
> "Parameters: {"action"=>"1-admin", "id"=>"edit_details",
> "controller"=>"people"} (pid:3596)"
>
> yep, for the standard edit view it works well as :
> Parameters: {"action"=>"edit", "id"=>"1-admin",
> "controller"=>"people"} (pid:3596)
>
> Is anyone aware about my newbie misunderstanding please ?
>
> Many thanks.
--~--~---------~--~----~------------~-------~--~----~
Insoshi developer site: http://dogfood.insoshi.com/
Insoshi documentation: http://docs.insoshi.com/
You received this message because you are subscribed to the Google
Groups "Insoshi" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/insoshi?hl=en
-~----------~----~----~----~------~----~------~--~---