# Why does rails keep prompting me for post?

**URL:** <https://www.ruby-forum.com/t/why-does-rails-keep-prompting-me-for-post/124749>\
**Category:** Rails\
**Created:** [January 2, 2008, 6:51am UTC](https://www.ruby-forum.com/t/why-does-rails-keep-prompting-me-for-post/124749 "2008-01-02T06:51:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kei\_Simone](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/839c29/32.png) [@Kei\_Simone](https://www.ruby-forum.com/u/Kei_Simone)\
**Post date:** [January 2, 2008, 6:51am UTC](https://www.ruby-forum.com/t/why-does-rails-keep-prompting-me-for-post/124749/1 "2008-01-02T06:51:39Z")

</div>

Hi, was tryin to do a restful method to allow users to change  
password.

This is what i did:

1. use restful authentication plugin.

2. use the code here  
[http://www.railslodge.com/plugins/75-restful-authentication/documentations/1-change-password](http://www.railslodge.com/plugins/75-restful-authentication/documentations/1-change-password)

3. realise that  
no1. i am using something funny like /v1/users/:permalink/  
change\_password and not just /change\_password

no2. i cant use html.erb for some reasons hence i resorted to  
using .rhtml

1. end up re writing the view code as such:

 \<% form\_for (:url =\> change\_password\_update\_user\_path(current\_user.permalink), :html =\> { :method =\> :put }) do |f| %\> 

| Old Password \<%= password\_field\_tag 'old\_password', @old\_password, :size =\> 45, :class =\> 'text' %\> |
| New Password \<%= password\_field\_tag 'password', {}, :size =\> 45, :class =\> 'text' %\> Between 4 and 40 characters |
| Confirm new password \<%= password\_field\_tag 'password\_confirmation', {}, :size =\> 45, :class =\> 'text' %\> |

\<%= submit\_tag ‘Change password’ %\>

\<%end%\>

1. 

wrote my routes.rb  
base = ‘/v1’

map.resources :users, :path\_prefix =\> base, :member =\>  
{:change\_password =\> :get, :change\_password\_update =\> :put} do |users|  
users.resources :orders, :path\_prefix =\> ‘/v1/users/:permalink’

end

1. got this error when i tried to attempt to change my password and  
press the submit button  
no route found to match “/v1/users/testuser1/change\_password” with  
{:method=\>:post}

why is it that after submitting the form, i will trigger a POST to  
change\_password\_user\_path?

please advise
