fields-for
How to get correct children ids using fields_for "parents[]", parent do |f| using f.fields_for :children, child?
I\'m editing multiple instances of a parent model in an index view in one form, as in Railscasts #198.[详细]
2023-03-15 13:09 分类:问答Rails fields_for duplicate forms for existing records after validation
I\'ve come across a rather bizarre error. I have a nested form that works as expected except when a validation fails on an existing record. When a validation fails on an existing record, the re-render[详细]
2023-03-13 19:09 分类:问答Forms to create and update Mongoid array fields
I\'ve been struggling to create a form for a Mongoid model that has an array field. I want my form to have on text box per entry in the array. If I\'m creating a new record, the default will be one em[详细]
2023-03-12 12:18 分类:问答fields_for unable to pass in an array
I\'m trying to do fields_for of a subset of objects and struggling some.Here are some details: class Club < ActiveRecord::Base[详细]
2023-03-08 02:21 分类:问答Duplicate form fields when using fields_for
I am trying to create a nested form to handle a has_many :through relationship and getting duplicated fields being rendere开发者_运维百科d.[详细]
2023-03-02 16:52 分类:问答When submitting a form with a fields_for part, how can I assign the new id to the fields_for model
I have a form that handles 2 models, Vehiculo and Poliza. This is how I have them set up right now: class Vehiculo < ActiveRecord::Base[详细]
2023-02-21 10:28 分类:问答Rails 3 fields_for - sort order gets lost
I am using Rails 3.0.3 with ruby 1.9.2p0. In my profiles_controller (edit function) I have this call @profile = Profile.find(params[:id])[详细]
2023-02-09 15:53 分类:问答Rails: fields_for with index?
Is there a method (or way to pull off similar functionality) to do a fields_for_with_index? Example: <% f.fields_for_with_index :questions do |builder开发者_开发知识库, index| %>[详细]
2023-02-07 13:28 分类:问答Rails, using has_many through and fields_for
I have a little trouble getting this to work. class User < ActiveRecord::Base has_many :events, :through => :event_users[详细]
2023-02-04 10:30 分类:问答fields_for for nested attribute returns nothing
I\'m trying to create a nested model form in Rails 3.0.3. Here are my models: class Bird < ActiveRecord::Base[详细]
2023-01-31 01:58 分类:问答