I\'m using accepts_nested_attributes_for for some nested resources and am using the _destroy flag to remove an item on form save.
I am trying to use nested attributes on my user model for settings so that I can edit the user info and the setting info in a single page.Here is my code:
I am trying to create form that contains another model in rails. I have accomplished this with using accepts_nested_attibutes and it is working great. The problem is I开发者_StackOverflow中文版 have
Rails 3.0.5 doesn\'t seem to destroy children of a parent object using accepts_nested_attributes_for unless the children are loaded. Does anyone know if this is by design?It seems a b开发者_StackOverf
When you submit a form to the controller for saving in ActiveRecord, you can add missing fields via @foo.field = \'bar\'. I would like to do the same thing for a nested attribute, but I cannot figure
this is my form code: <%= simple_form_for setup_video(@video) do |f| %> <% f.fields_for :comment_titles do |t| %>
Let\'s say that you have a resource that is created and displayed entirely within the view of开发者_Python百科 another resource (eg. comments or tags). Should you still make it it\'s own resource, or
I have a user model that has_one profile, and the profile belongs to the user. The profile has a type column for single table inheritance that is either \"artist\" or \"listener\". I want the user to
I get this error \"WARNING: Can\'t mass-assign protected attributes: races_attributes\" , when following this http://railscasts.com/episodes/196-nested-model-form-part-1 on rails 3.
I have a parent model that accepts child attributes. class User < ActiveRecord::Base accepts_nested_attributes_for :spec