Sha256: 55bcc4405c626d4276593483c6154108e8f4d90e42646b5a2e147e3c7645c23b

Contents?: true

Size: 319 Bytes

Versions: 7

Compression:

Stored size: 319 Bytes

Contents

class DataGroup < ActiveRecord::Base

  acts_as_list
  default_scope :order => :position

  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

7 entries across 7 versions & 1 rubygems

Version Path
census-0.5.2 app/models/data_group.rb
census-0.5.0 app/models/data_group.rb
census-0.4.4 app/models/data_group.rb
census-0.4.3 app/models/data_group.rb
census-0.4.2 app/models/data_group.rb
census-0.4.1 app/models/data_group.rb
census-0.4.0 app/models/data_group.rb