Sha256: 60949c9af0292bf5589fe13c2ff6c1929368068a5e976c5bb0f73c6aecf2d691
Contents?: true
Size: 538 Bytes
Versions: 69
Compression:
Stored size: 538 Bytes
Contents
# frozen_string_literal: true class Avo::Fields::IndexComponent < ViewComponent::Base include Avo::ResourcesHelper def initialize(field: nil, resource: nil, index: 0, parent_model: nil) @field = field @resource = resource @index = index @parent_model = parent_model end def resource_path if @parent_model.present? helpers.resource_path(@resource.model, via_resource_class: @parent_model.class, via_resource_id: @parent_model.id) else helpers.resource_path(@resource.model) end end end
Version data entries
69 entries across 69 versions & 1 rubygems