Sha256: 9a0b1ddf9b99319a70bb75e9056e91c748ab8888ab0bafe93661f62d0bee8e1d

Contents?: true

Size: 283 Bytes

Versions: 5

Compression:

Stored size: 283 Bytes

Contents

class DataGroup < ActiveRecord::Base

  acts_as_list

  has_many :questions, :dependent => :destroy, :inverse_of => :data_group
  accepts_nested_attributes_for :questions, :reject_if => lambda { |a| a[:prompt].blank? }, :allow_destroy => true
  
  validates_presence_of :name
  
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
census-0.3.1 app/models/data_group.rb
census-0.3.0 app/models/data_group.rb
census-0.2.1 app/models/data_group.rb
census-0.2.0 app/models/data_group.rb
census-0.1.0 app/models/data_group.rb