Sha256: acbe7a034d08195a17532d14ef9556991a3e9c6eacc33ca1edcf22f3b010f68c

Contents?: true

Size: 303 Bytes

Versions: 4

Compression:

Stored size: 303 Bytes

Contents

module Spree
  class QuestionCategory < ActiveRecord::Base
    acts_as_list

    has_many :questions, class_name: 'Spree::Question'
    validates :name, presence: true
    validates :name, uniqueness: { case_sensitive: false }
    accepts_nested_attributes_for :questions, allow_destroy: true
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
spree-faq-2.4.0 app/models/spree/question_category.rb
spree-faq-2.3.0 app/models/spree/question_category.rb
spree-faq-2.2.1 app/models/spree/question_category.rb
spree-faq-2.1.1 app/models/spree/question_category.rb