Sha256: 185a5fd4bfc93a8385fe7ba9a818376a79acb15b9c399c6be1fb13ceb43733db

Contents?: true

Size: 557 Bytes

Versions: 13

Compression:

Stored size: 557 Bytes

Contents

class Column
  include Mongoid::Document
  include Mongoid::Timestamps
  include Mongoid::Slug
  include ActiveModel::MassAssignmentSecurity
  
  include Model::MongoDb::Customizable
  
  belongs_to :story
  
  has_many :tasks, dependent: :destroy
  
  field :key, type: String
  field :text, type: String
  field :state, type: String
  
  attr_accessible :story_id, :key, :text
  
  private
  
  def cache_product_association
    self.product_id = story.project.product_id if story_id.present? && (story.project rescue nil)
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
voluntary-0.7.1 app/models/column.rb
voluntary-0.7.0 app/models/column.rb
voluntary-0.6.0 app/models/column.rb
voluntary-0.5.2 app/models/column.rb
voluntary-0.5.1 app/models/column.rb
voluntary-0.5.0 app/models/column.rb
voluntary-0.4.0 app/models/column.rb
voluntary-0.3.0 app/models/column.rb
voluntary-0.2.4 app/models/column.rb
voluntary-0.2.3 app/models/column.rb
voluntary-0.2.2 app/models/column.rb
voluntary-0.2.1 app/models/column.rb
voluntary-0.2.0 app/models/column.rb