Sha256: a9a34fd7cf819b878c361da89a50113efd64ad0f40759b4dded2bab1aed6b047

Contents?: true

Size: 721 Bytes

Versions: 7

Compression:

Stored size: 721 Bytes

Contents

class Parent < ActiveRecord::Base
  has_many :some_other_models
  has_many :testies
  accepts_nested_attributes_for :some_other_models,
                                :allow_destroy => true,
                                :reject_if => proc { |attrs| attrs['name'].blank? }
  accepts_nested_attributes_for :testies,
                                :allow_destroy => true,
                                :reject_if => proc { |attrs|
                                  attrs['first_name'].blank? &&
                                  attrs['last_name'].blank? &&
                                  attrs['address'].blank? &&
                                  attrs['some_flag'].blank?
                                }
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
repeated_auto_complete-0.1.3 test/view_mapper/expected_templates/parent.rb
repeated_auto_complete-0.1.2 test/view_mapper/expected_templates/parent.rb
repeated_auto_complete-0.1.1 test/view_mapper/expected_templates/parent.rb
view_mapper-0.3.3 test/views/has_many/expected_templates/parent.rb
view_mapper-0.3.2 test/views/has_many/expected_templates/parent.rb
view_mapper-0.3.1 test/views/has_many/expected_templates/parent.rb
repeated_auto_complete-0.1.0 test/view_mapper/expected_templates/parent.rb