Sha256: 28b509b4c3f002b7ab3dda8563112452f6b329bbb7d5269532aca8be2c004eff

Contents?: true

Size: 429 Bytes

Versions: 1

Compression:

Stored size: 429 Bytes

Contents

class Programmer < ActiveRecord::Base
  has_many :projects, :through => :assignments
  has_many :assignments
  accepts_nested_attributes_for :assignments,
                                :allow_destroy => true,
                                :reject_if => proc { |attrs|
                                  attrs['name'].blank? &&
                                  attrs['project_id'].blank?
                                }
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
view_mapper-0.3.4 test/views/has_many_existing/expected_templates/programmer.rb