Sha256: ca8d7c58c1f290ddaf375809e59fe428bc03fbc4f7bbcf3e041034590090f211
Contents?: true
Size: 594 Bytes
Versions: 64
Compression:
Stored size: 594 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(model: @resource.model, resource: @resource, via_resource_class: @parent_model.class, via_resource_id: @parent_model.id) else helpers.resource_path(model: @resource.model, resource: @resource) end end end
Version data entries
64 entries across 64 versions & 1 rubygems