Class: Brightcontent::ViewLookup::ListField

Inherits:
Abstract
  • Object
show all
Defined in:
lib/brightcontent/view_lookup/list_field.rb

Instance Attribute Summary

Attributes inherited from Abstract

#options, #view_context

Instance Method Summary collapse

Methods inherited from Abstract

#call, #initialize

Constructor Details

This class inherits a constructor from Brightcontent::ViewLookup::Abstract

Instance Method Details

#field_typeObject



8
9
10
# File 'lib/brightcontent/view_lookup/list_field.rb', line 8

def field_type
  options[:item].column_for_attribute(options[:field]).try(:type)
end

#render_defaultObject



4
5
6
# File 'lib/brightcontent/view_lookup/list_field.rb', line 4

def render_default
  view_context.strip_tags(field_value.to_s).truncate(50)
end