Sha256: 0f0c1395affa8daaff8d2ad50dda2bd00479c820c621397662f9665428d8b40e
Contents?: true
Size: 568 Bytes
Versions: 56
Compression:
Stored size: 568 Bytes
Contents
module ForestLiana class ResourceGetter < BaseGetter attr_accessor :record def initialize(resource, params) @resource = resource @params = params @collection_name = ForestLiana.name_for(@resource) @collection = get_collection(@collection_name) end def perform @record = get_resource().eager_load(includes).find(@params[:id]) end def includes SchemaUtils.one_associations(@resource) .select { |association| SchemaUtils.model_included?(association.klass) } .map(&:name) end end end
Version data entries
56 entries across 56 versions & 1 rubygems