Class: ForestLiana::BaseGetter
- Inherits:
-
Object
- Object
- ForestLiana::BaseGetter
show all
- Defined in:
- app/services/forest_liana/base_getter.rb
Instance Method Summary
collapse
Instance Method Details
#get_current_collection(table_name) ⇒ Object
3
4
5
6
7
|
# File 'app/services/forest_liana/base_getter.rb', line 3
def get_current_collection(table_name)
ForestLiana.apimap.find do |collection|
collection.name.to_s == table_name
end
end
|
#get_resource ⇒ Object
9
10
11
12
13
14
15
16
|
# File 'app/services/forest_liana/base_getter.rb', line 9
def get_resource
use_act_as_paranoid = @resource.instance_methods
.include? :really_destroyed?
use_act_as_paranoid ? @resource : @resource.unscoped
end
|