Class: Para::AttributeField::FileField

Inherits:
AttributeField::Base
  • Object
show all
Includes:
ActionView::Helpers::UrlHelper
Defined in:
lib/para/attribute_field/file.rb

Instance Method Summary collapse

Instance Method Details

#excerptable_value?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/para/attribute_field/file.rb', line 17

def excerptable_value?
  false
end

#value_for(instance) ⇒ Object



10
11
12
13
14
15
# File 'lib/para/attribute_field/file.rb', line 10

def value_for(instance)
  if instance.send(:"#{ name }?")
    url = instance.send(name).url
    link_to(url, url)
  end
end

#wrapper_nameObject



21
22
23
# File 'lib/para/attribute_field/file.rb', line 21

def wrapper_name
  :horizontal_file_input
end