Sha256: 8111e80ecfe7c044657824a1349ecb344c3f106826323301cf392ac3e648ad56

Contents?: true

Size: 353 Bytes

Versions: 23

Compression:

Stored size: 353 Bytes

Contents

class QuestionSweeper < ActionController::Caching::Sweeper
  observe Answer
  include ExpireEditableFragment

  def after_save(record)
    case record.to_s.to_sym
    when :Answer
      record.items.each do |item|
        expire_editable_fragment(item.manifestation)
      end
    end
  end

  def after_destroy(record)
    after_save(record)
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
enju_question-0.1.0.pre11 app/models/question_sweeper.rb
enju_question-0.1.0.pre10 app/models/question_sweeper.rb
enju_question-0.1.0.pre9 app/models/question_sweeper.rb
enju_question-0.1.0.pre8 app/models/question_sweeper.rb
enju_question-0.1.0.pre7 app/models/question_sweeper.rb
enju_question-0.1.0.pre6 app/models/question_sweeper.rb
enju_question-0.1.0.pre5 app/models/question_sweeper.rb
enju_question-0.1.0.pre4 app/models/question_sweeper.rb
enju_question-0.1.0.pre3 app/models/question_sweeper.rb
enju_question-0.1.0.pre2 app/models/question_sweeper.rb
enju_question-0.1.0.pre app/models/question_sweeper.rb
enju_question-0.0.21 app/models/question_sweeper.rb
enju_question-0.0.20 app/models/question_sweeper.rb
enju_question-0.0.19 app/models/question_sweeper.rb
enju_question-0.0.18 app/models/question_sweeper.rb
enju_question-0.0.17 app/models/question_sweeper.rb
enju_question-0.0.16 app/models/question_sweeper.rb
enju_question-0.0.15 app/models/question_sweeper.rb
enju_question-0.0.14 app/models/question_sweeper.rb
enju_question-0.0.13 app/models/question_sweeper.rb