Sha256: a473c9819292aa3807b198f8f0d1faa3ff35f5aec2737326e52deb56c88ebafc

Contents?: true

Size: 646 Bytes

Versions: 6

Compression:

Stored size: 646 Bytes

Contents

module GeoWorks
  module EventsBehavior
    extend ActiveSupport::Concern

    def destroy
      geo_works_events_generator.record_deleted(geo_work)
      super
    end

    def after_create_response
      super
      geo_works_events_generator.record_created(geo_work)
    end

    def after_update_response
      super
      geo_works_events_generator.record_updated(geo_work)
    end

    def geo_works_events_generator
      @geo_works_events_generator ||= GeoWorks::EventsGenerator.new
    end

    def geo_work
      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_works-0.2.0 app/controllers/concerns/geo_works/events_behavior.rb
geo_works-0.1.4 app/controllers/concerns/geo_works/events_behavior.rb
geo_works-0.1.3 app/controllers/concerns/geo_works/events_behavior.rb
geo_works-0.1.2 app/controllers/concerns/geo_works/events_behavior.rb
geo_works-0.1.1 app/controllers/concerns/geo_works/events_behavior.rb
geo_works-0.1.0 app/controllers/concerns/geo_works/events_behavior.rb