Sha256: b9caaef4858fc7e08d417408cf91abb004f08a2c5579d58b040178e15e5a6e18

Contents?: true

Size: 483 Bytes

Versions: 13

Compression:

Stored size: 483 Bytes

Contents

class BookmarkSweeper < ActionController::Caching::Sweeper
  include ExpireEditableFragment
  observe Bookmark, Tag

  def after_save(record)
    case record.class.to_s.to_sym
    when :Bookmark
      expire_editable_fragment(record.manifestation)
      expire_tag_cloud(record)
    when :Tag
      record.taggings.collect(&:taggable).each do |taggable|
        expire_editable_fragment(taggable)
      end
    end
  end

  def after_destroy(record)
    after_save(record)
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
enju_bookmark-0.0.19 app/models/bookmark_sweeper.rb
enju_bookmark-0.0.18 app/models/bookmark_sweeper.rb
enju_bookmark-0.0.17 app/models/bookmark_sweeper.rb
enju_bookmark-0.0.16 app/models/bookmark_sweeper.rb
enju_bookmark-0.0.15 app/models/bookmark_sweeper.rb
enju_bookmark-0.0.14 app/models/bookmark_sweeper.rb
enju_bookmark-0.0.13 app/models/bookmark_sweeper.rb
enju_bookmark-0.0.12 app/models/bookmark_sweeper.rb
enju_bookmark-0.0.11 app/models/bookmark_sweeper.rb
enju_bookmark-0.0.10 app/models/bookmark_sweeper.rb
enju_bookmark-0.0.9 app/models/bookmark_sweeper.rb
enju_bookmark-0.0.8 app/models/bookmark_sweeper.rb
enju_bookmark-0.0.7 app/models/bookmark_sweeper.rb