Class: Administrate::Field::Text

Inherits:
Base
  • Object
show all
Defined in:
lib/administrate/field/text.rb

Instance Attribute Summary

Attributes inherited from Base

#attribute, #data, #page, #resource

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#html_class, html_class, #initialize, #name, permitted_attribute, #to_partial_path, with_options

Constructor Details

This class inherits a constructor from Administrate::Field::Base

Class Method Details

.searchable?Boolean

Returns:



6
7
8
# File 'lib/administrate/field/text.rb', line 6

def self.searchable?
  false
end

Instance Method Details

#truncateObject



10
11
12
# File 'lib/administrate/field/text.rb', line 10

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