Sha256: 94bce6860a374486c7848b2438e7fbd9a9e860c2a6a79f950db1846cdbf18961

Contents?: true

Size: 569 Bytes

Versions: 2

Compression:

Stored size: 569 Bytes

Contents

module GeoConcerns
  module MessengerBehavior
    extend ActiveSupport::Concern

    def destroy
      messenger.record_deleted(geo_concern)
      super
    end

    def after_create_response
      super
      messenger.record_created(geo_concern)
    end

    def after_update_response
      super
      messenger.record_updated(geo_concern)
    end

    def messenger
      @messenger ||= Messaging.messenger
    end

    def geo_concern
      doc = SolrDocument.new(curation_concern.to_solr)
      show_presenter.new(doc, current_ability, request)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
geo_concerns-0.1.1 app/controllers/concerns/geo_concerns/messenger_behavior.rb
geo_concerns-0.1.0 app/controllers/concerns/geo_concerns/messenger_behavior.rb