开发者

Rails: Nested_form_for and scope, POST creates record twice/duplicate

开发者 https://www.devze.com 2023-04-11 21:20 出处:网络
In my form I need my admin scope like this <%= form_for [:admin, @event], :html => {:multipart => true} do |f| %>

In my form I need my admin scope like this

<%= form_for [:admin, @event], :html => {:multipart => true} do |f| %>

Now, replacing this with nested_form_for (Using Ran Bates' Nested_form gem)

<%= nested_form_for [:admin, @event], 开发者_StackOverflow:html => {:multipart => true} do |f| %>

the POST action inserts the new nested task record for this event twice!?

Removing the :admin scope fixes this, but I could not do without it. What would be a solution here? Thanks!


Issue originated from messed up controller action. Closing this.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号