Sha256: 50eeaf99c18ee17065a1e6c25a503d1612067f3fc6f056c722fa45654f36a737

Contents?: true

Size: 387 Bytes

Versions: 234

Compression:

Stored size: 387 Bytes

Contents

module Avo
  module Fields
    class IdField < BaseField
      attr_reader :link_to_resource

      def initialize(id, **args, &block)
        args[:readonly] = true
        args[:sortable] = true

        hide_on [:edit, :new]

        super(id, **args, &block)

        @link_to_resource = args[:link_to_resource].present? ? args[:link_to_resource] : false
      end
    end
  end
end

Version data entries

234 entries across 234 versions & 1 rubygems

Version Path
avo-2.11.2.pre.3 lib/avo/fields/id_field.rb
avo-2.11.2.pre.2 lib/avo/fields/id_field.rb
avo-2.11.2.pre.1 lib/avo/fields/id_field.rb
avo-2.11.1.pre.3 lib/avo/fields/id_field.rb
avo-2.11.1 lib/avo/fields/id_field.rb
avo-2.11.1.pre.2 lib/avo/fields/id_field.rb
avo-2.11.1.pre.1 lib/avo/fields/id_field.rb
avo-2.11.0 lib/avo/fields/id_field.rb
avo-2.10.3.pre.1 lib/avo/fields/id_field.rb
avo-1.25.2 lib/avo/fields/id_field.rb
avo-2.10.2 lib/avo/fields/id_field.rb
avo-2.9.2.pre1 lib/avo/fields/id_field.rb
avo-2.10.0 lib/avo/fields/id_field.rb
avo-2.9.1.pre7 lib/avo/fields/id_field.rb
avo-2.9.1.pre6 lib/avo/fields/id_field.rb
avo-2.9.1.pre5 lib/avo/fields/id_field.rb
avo-2.9.1.pre4 lib/avo/fields/id_field.rb
avo-2.9.1.pre3 lib/avo/fields/id_field.rb
avo-2.9.1.pre2 lib/avo/fields/id_field.rb
avo-2.9.1.pre1 lib/avo/fields/id_field.rb