Sha256: f7d09728ab533df763e45ad546e030ef44877f4a3acbc14ee5383c0214d5e26d

Contents?: true

Size: 313 Bytes

Versions: 12

Compression:

Stored size: 313 Bytes

Contents

module EnjuQuestion
  module QuestionItem
    def self.included(base)
      base.extend ClassMethods
    end

    module ClassMethods
      def enju_question_item_model
        has_many :answer_has_items, :dependent => :destroy
        has_many :answers, :through => :answer_has_items
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
enju_question-0.1.1 lib/enju_question/item.rb
enju_question-0.1.0 lib/enju_question/item.rb
enju_question-0.1.0.pre15 lib/enju_question/item.rb
enju_question-0.1.0.pre14 lib/enju_question/item.rb
enju_question-0.1.0.pre13 lib/enju_question/item.rb
enju_question-0.1.0.pre12 lib/enju_question/item.rb
enju_question-0.1.0.pre11 lib/enju_question/item.rb
enju_question-0.1.0.pre10 lib/enju_question/item.rb
enju_question-0.1.0.pre9 lib/enju_question/item.rb
enju_question-0.1.0.pre8 lib/enju_question/item.rb
enju_question-0.1.0.pre7 lib/enju_question/item.rb
enju_question-0.1.0.pre6 lib/enju_question/item.rb