Ruby on Rails
Sunday, November 2, 2014
Hey Dave,
I think may be error in your controller, can you once again check profiles controller edit action
On Mon, Nov 3, 2014 at 7:27 AM, Dave Castellano <lists@ruby-forum.com> wrote:
Hi,
When I try to update a field using the update button I am getting the
error: No route matches [PATCH] "/profile". Its obviously missing the
/:id but I can't figure out why...
I am using a form_for in an edit view.
<%= form_for @profile, :html => { :class => 'form-horizontal '} do |f|
%>
...
<%= f.submit 'Update', :class => 'btn btn-primary' %>
...
<% end %>
@profile contains #<Profile:0x00000104c26398> as it should.
routes contains: resources :profiles and the resulting routes appear OK
Do I have to somehow configure the form_for to pass the :id to the
route?
Thanks
Dave Castellano, MD
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/04269e5bd1fe0e2fa4f71eabc7f91e1f%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.
----------------------------------------------------------------------------------------------------
Thank You.
Best Wishes,
BalaRaju Vankala,
8886565300.
Thank You.
Best Wishes,
BalaRaju Vankala,
8886565300.
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAGQ0aifoTk5zBNgfzyNe2-qaOiJMhwXziO%2B2LAzHwok%2B34tgVA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment