Class: ActiveAdmin::Views::AttributesTable

Inherits:
Object
  • Object
show all
Defined in:
lib/activeadmin_addons/addons/enum_tag.rb,
lib/activeadmin_addons/addons/bool_values.rb,
lib/activeadmin_addons/addons/paperclip_image.rb,
lib/activeadmin_addons/addons/paperclip_attachment.rb

Instance Method Summary collapse

Instance Method Details

#attachment_row(attribute, options = {}) ⇒ Object



50
51
52
53
# File 'lib/activeadmin_addons/addons/paperclip_attachment.rb', line 50

def attachment_row(attribute, options = {})
  options[:truncate] = options.fetch(:truncate, false)
  row(attribute) { |model| PaperclipAttachment.link(self, model, attribute, options) }
end

#bool_row(attribute) ⇒ Object



36
37
38
# File 'lib/activeadmin_addons/addons/bool_values.rb', line 36

def bool_row(attribute)
  row(attribute) { |model| BoolValues.bool_value(model, attribute) }
end

#image_row(attribute, options = {}) ⇒ Object



21
22
23
# File 'lib/activeadmin_addons/addons/paperclip_image.rb', line 21

def image_row(attribute, options = {})
  row(attribute) { |model| PaperclipImage.image(self, model, attribute, options) }
end

#tag_row(attribute, options = {}) ⇒ Object



21
22
23
# File 'lib/activeadmin_addons/addons/enum_tag.rb', line 21

def tag_row(attribute, options = {})
  row(attribute) { |model| EnumTag.tag(self, model, attribute, options) }
end