Ganesh Kathare wrote in post #957752:
>
> Hi,
> Why you want to post your form on same (i.e edit) method?
> As in rails already has CRUD good feature. So y need to custom your form
> submit flow?
I asked myself the very same question; it was not me that built the
site. I can assure you that if it were me, it would follow the CRUD
framework.
> Anyway... I would give following solution for you case
>
> 1- check that routes.rb file
> if u have
>
> map.resources :product_admin
>
> then replace those routes using
>
> map.with_options :controller => :product_admin do |pp|
> pp.edit 'product_admin/edit/:id', :action => :edit
> ..
> ..ur all methods routes should be here
> ..
> end
>
> 2 - check you edit.html.erb file
>
> add :url => {:action => :edit} in you form tag
>
> One main thing in your controller prefer params[:product_admin] or
> whatever ur form array instead of request.post?
>
> like
>
> if params[:product_admin]
> ...
> end
>
> I hope this will help you!!
>
> Good luck ;)
>
> - Ganesh K
Thank you for your response.
--
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 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/rubyonrails-talk?hl=en.