Sha256: 641279f70572fadff4d51c5cb0dfdf22c8e4bbc5e45e4b151bcd15442fe966fd

Contents?: true

Size: 480 Bytes

Versions: 33

Compression:

Stored size: 480 Bytes

Contents

module ForestLiana
  class BaseGetter
    def get_collection(collection_name)
      ForestLiana.apimap.find { |collection| collection.name.to_s == collection_name }
    end

    def get_resource
      use_act_as_paranoid = @resource.instance_methods
        .include? :really_destroyed?

      # NOTICE: Do not unscope with the paranoia gem to prevent the retrieval
      #         of deleted records.
      use_act_as_paranoid ? @resource : @resource.unscoped
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
forest_liana-2.6.0 app/services/forest_liana/base_getter.rb
forest_liana-2.5.5 app/services/forest_liana/base_getter.rb
forest_liana-2.5.4 app/services/forest_liana/base_getter.rb
forest_liana-2.5.3 app/services/forest_liana/base_getter.rb
forest_liana-2.5.2 app/services/forest_liana/base_getter.rb
forest_liana-2.5.1 app/services/forest_liana/base_getter.rb
forest_liana-2.5.0 app/services/forest_liana/base_getter.rb
forest_liana-2.4.9 app/services/forest_liana/base_getter.rb
forest_liana-2.4.8 app/services/forest_liana/base_getter.rb
forest_liana-2.4.7 app/services/forest_liana/base_getter.rb
forest_liana-2.4.6 app/services/forest_liana/base_getter.rb
forest_liana-2.4.5 app/services/forest_liana/base_getter.rb
forest_liana-2.4.4 app/services/forest_liana/base_getter.rb
forest_liana-2.4.3 app/services/forest_liana/base_getter.rb
forest_liana-2.4.2 app/services/forest_liana/base_getter.rb
forest_liana-2.4.1 app/services/forest_liana/base_getter.rb
forest_liana-2.4.0 app/services/forest_liana/base_getter.rb
forest_liana-2.3.5 app/services/forest_liana/base_getter.rb
forest_liana-2.3.4 app/services/forest_liana/base_getter.rb
forest_liana-2.3.3 app/services/forest_liana/base_getter.rb