Sha256: 941f7c6d86db17f5a96c20fce5b0e2cecf5fb28f0f9d3ab9566a6473b3a809b0

Contents?: true

Size: 318 Bytes

Versions: 12

Compression:

Stored size: 318 Bytes

Contents

require_relative "base"

module Administrate
  module Field
    class Url < Field::Base
      def self.searchable?
        true
      end

      def truncate
        data.to_s[0...truncation_length]
      end

      private

      def truncation_length
        options.fetch(:truncate, 50)
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
administrate-0.17.0 lib/administrate/field/url.rb
administrate-0.16.0 lib/administrate/field/url.rb
administrate-0.15.0 lib/administrate/field/url.rb
administrate-0.14.0 lib/administrate/field/url.rb
viniBaxterDesk-22.0.0 lib/administrate/field/url.rb
viniBaxterDesk-0.21.0 lib/administrate/field/url.rb
viniBaxterDesk-0.20.0 lib/administrate/field/url.rb
viniBaxterDesk-0.14.0 lib/administrate/field/url.rb
viniBaxterDesk-0.13.2 lib/administrate/field/url.rb
viniBaxterDesk-0.13.1 lib/administrate/field/url.rb
administrate-0.13.0 lib/administrate/field/url.rb
administrate-0.12.0 lib/administrate/field/url.rb