Sha256: 7e9fa08cb4075b7d5790603cc1fbc04194d6627037d2c9b1833540b9c7767de4

Contents?: true

Size: 224 Bytes

Versions: 24

Compression:

Stored size: 224 Bytes

Contents

class Question
  include Mongoid::Document
  field :content
  embedded_in :survey
  embeds_many :answers

  accepts_nested_attributes_for :answers, :reject_if => lambda { |a| a[:content].blank? }, :allow_destroy => true
end

Version data entries

24 entries across 24 versions & 5 rubygems

Version Path
mongoid_spacial-0.2.17 spec/models/question.rb
sig_mongoid_spacial-0.2.17 spec/models/question.rb
cb_mongoid_spacial-0.2.16 spec/models/question.rb
mongoid_geospatial-1.0.0 spec/models/question.rb
mongoid_geospatial-1.0.0rc1 spec/models/question.rb
mongoid_geospatial-1.0.0rc0 spec/models/question.rb
mongoid_spacial-0.2.16 spec/models/question.rb
mongoid_spacial-0.2.13 spec/models/question.rb
mongoid_spacial-0.2.12 spec/models/question.rb
mongoid_spacial-0.2.11 spec/models/question.rb
mongoid_spacial-0.2.10 spec/models/question.rb
mongoid_spacial-0.2.8 spec/models/question.rb
mongoid_spacial-0.2.7 spec/models/question.rb
mongoid_spacial-0.2.6 spec/models/question.rb
mongoid_spacial-0.2.5 spec/models/question.rb
mongoid_spacial-0.2.4 spec/models/question.rb
mongoid_spacial-0.2.3 spec/models/question.rb
mongoid_spacial-0.2.2 spec/models/question.rb
mongoid_spacial-0.2.0 spec/models/question.rb
mongoid_spacial-0.1.1 spec/models/question.rb