Class: Para::AttributeField::FileField
- Includes:
- ActionView::Helpers::UrlHelper
- Defined in:
- lib/para/attribute_field/file.rb
Instance Attribute Summary
Attributes inherited from Base
#field_method, #field_type, #model, #name, #options, #type
Instance Method Summary collapse
Methods inherited from Base
#attribute_column_path, #determine_name_and_field_method!, #field_name, field_option, #field_options, field_types, #initialize, #parse_input, register, #searchable?, #type?
Constructor Details
This class inherits a constructor from Para::AttributeField::Base
Instance Method Details
#excerptable_value? ⇒ 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_name ⇒ Object
21 22 23 |
# File 'lib/para/attribute_field/file.rb', line 21 def wrapper_name :horizontal_file_input end |