Put the attached file to config/initalizers
to ignore some fields for rejecting nested records (e.g. hidden input fields).
class Post < ActiveRecord::Base
has_many :comments
accepts_nested_attributes_for :comments, :reject_if => all_blank_except(:position, :other_nested_attrs)
end
Posted by Martin Straub to makandra dev (2014-03-19 14:11)