Class: RailsAdmin::Config::Fields::Types::Carrierwave
- Inherits:
-
FileUpload
- Object
- Base
- Base
- FileUpload
- RailsAdmin::Config::Fields::Types::Carrierwave
- Defined in:
- lib/rails_admin/config/fields/types/carrierwave.rb
Overview
Field type that supports Paperclip file uploads
Instance Attribute Summary
Attributes inherited from Base
#defined, #name, #order, #properties, #section
Attributes inherited from Base
#abstract_model, #bindings, #parent, #root
Instance Method Summary collapse
Methods inherited from Base
#_html_attributes, #association?, #editable, #errors, inherited, #initialize, #inverse_of, #method_name, #nested_form, #optional, #optional=, #optional?, #render, #type, #type_css_class, #value, #virtual?
Methods included from Hideable
#hidden?, #hide, included, #show
Methods inherited from Base
#has_option?, #initialize, register_class_option, #register_deprecated_instance_option, register_deprecated_instance_option, #register_instance_option, register_instance_option, #with
Constructor Details
This class inherits a constructor from RailsAdmin::Config::Fields::Base
Instance Method Details
#resource_url(thumb = false) ⇒ Object
32 33 34 35 |
# File 'lib/rails_admin/config/fields/types/carrierwave.rb', line 32 def resource_url(thumb = false) return nil unless (uploader = bindings[:object].send(name)).present? thumb.present? ? uploader.send(thumb).url : uploader.url end |