I am trying to follow the rules and stay RESTful, but I am running into some problems.
I set my routes so I am sure it is calling the right action, when I run rake routes this comes up:
PUT /admin/settings {:controller=>"admin", :action=>"save_settings"}
So I know my route is correct, and in my *views/admin/settings.html.erb" I have the following:
<% form_for(:settings, :html => { :method => :put },:builder => MyFormBuilder) do |f| %>
And everything seems to render correctly (since rails dances around a PUT):
<form action="/admin/settings" method="post">
<input name="_method" type="hidden" value="put" />
But when I actually click on the submit button, nothing happens. For testing, I simply do a flash:
# PUT admin/settings
def save_settings
flash[:notice] = 'Settings Saved'
render :action => 'settings'
end
And nothing flashes. I think I covered my bases here, but I must be forgetting something. please help out a RoR noob :)