Sha256: 6e3f11280c9591a020d03b063f74cf888c044a6ada49f175f08fa7c5b67d9670

Contents?: true

Size: 647 Bytes

Versions: 6

Compression:

Stored size: 647 Bytes

Contents

module GeoConcerns
  module MessengerBehavior
    extend ActiveSupport::Concern

    def destroy
      geo_concerns_messenger.record_deleted(geo_concern)
      super
    end

    def after_create_response
      super
      geo_concerns_messenger.record_created(geo_concern)
    end

    def after_update_response
      super
      geo_concerns_messenger.record_updated(geo_concern)
    end

    def geo_concerns_messenger
      @geo_concerns_messenger ||= GeoConcerns::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

6 entries across 6 versions & 1 rubygems

Version Path
geo_concerns-0.3.4 app/controllers/concerns/geo_concerns/messenger_behavior.rb
geo_concerns-0.3.3 app/controllers/concerns/geo_concerns/messenger_behavior.rb
geo_concerns-0.3.2 app/controllers/concerns/geo_concerns/messenger_behavior.rb
geo_concerns-0.3.1 app/controllers/concerns/geo_concerns/messenger_behavior.rb
geo_concerns-0.3.0 app/controllers/concerns/geo_concerns/messenger_behavior.rb
geo_concerns-0.2.0 app/controllers/concerns/geo_concerns/messenger_behavior.rb