Sha256: e389cee5aec2192f0950c84c8cc851fe68023dcf1bcbd140cc078975455413ff

Contents?: true

Size: 432 Bytes

Versions: 61

Compression:

Stored size: 432 Bytes

Contents

# frozen_string_literal: true
require 'ransack/helpers/form_helper'

module Tables
  class ActiveRecordThComponent < ViewComponent::Base
    include Ransack::Helpers::FormHelper

    def initialize(column_name:, ransack_object: )
      @column_name = column_name
      @q = ransack_object
      @label = label
    end

    def label
      I18n.t("bo.#{@q.object.klass.to_s.underscore}.attributes.#{@column_name}")
    end
  end
end

Version data entries

61 entries across 61 versions & 1 rubygems

Version Path
tybo-0.3.20 app/components/tables/active_record_th_component.rb
tybo-0.3.19 app/components/tables/active_record_th_component.rb
tybo-0.3.18 app/components/tables/active_record_th_component.rb
tybo-0.3.17 app/components/tables/active_record_th_component.rb
tybo-0.3.16 app/components/tables/active_record_th_component.rb
tybo-0.3.15 app/components/tables/active_record_th_component.rb
tybo-0.3.14 app/components/tables/active_record_th_component.rb
tybo-0.3.13 app/components/tables/active_record_th_component.rb
tybo-0.3.12 app/components/tables/active_record_th_component.rb
tybo-0.3.11 app/components/tables/active_record_th_component.rb
tybo-0.3.10 app/components/tables/active_record_th_component.rb
tybo-0.3.9 app/components/tables/active_record_th_component.rb
tybo-0.3.8 app/components/tables/active_record_th_component.rb
tybo-0.3.7 app/components/tables/active_record_th_component.rb
tybo-0.3.6 app/components/tables/active_record_th_component.rb
tybo-0.3.4 app/components/tables/active_record_th_component.rb
tybo-0.3.3 app/components/tables/active_record_th_component.rb
tybo-0.3.1 app/components/tables/active_record_th_component.rb
tybo-0.2.6 app/components/tables/active_record_th_component.rb
tybo-0.2.5 app/components/tables/active_record_th_component.rb