Sha256: 615d2f9fce6909ef342de03a2d54cba63ea3532a8e49c8918a36cdebe5805ee5

Contents?: true

Size: 641 Bytes

Versions: 8

Compression:

Stored size: 641 Bytes

Contents

# frozen_string_literal: true

class Avo::Index::ResourceTableComponent < ViewComponent::Base
  include Avo::ApplicationHelper
  attr_reader :pagy

  def initialize(resources: nil, resource: nil, reflection: nil, parent_model: nil, parent_resource: nil, pagy: nil, query: nil)
    @resources = resources
    @resource = resource
    @reflection = reflection
    @parent_model = parent_model
    @parent_resource = parent_resource
    @pagy = pagy
    @query = query
  end

  def encrypted_query
    return if @query.nil?

    Avo::Services::EncryptionService.encrypt(
      message: @query.to_sql,
      purpose: :select_all
    )
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
avo-2.14.3.pre.3.jsbundling app/components/avo/index/resource_table_component.rb
avo-2.14.3.pre.2.tailwindcss app/components/avo/index/resource_table_component.rb
avo-2.14.3.pre.1.branding app/components/avo/index/resource_table_component.rb
avo-2.14.2 app/components/avo/index/resource_table_component.rb
avo-2.14.2.pre.1 app/components/avo/index/resource_table_component.rb
avo-2.14.1 app/components/avo/index/resource_table_component.rb
avo-2.14.1.pre.1 app/components/avo/index/resource_table_component.rb
avo-2.14.0 app/components/avo/index/resource_table_component.rb