Sha256: 3bd72049d6c19eb8dfd799f5bd565e81d262ffdcc1ad22ee8e5a278ccdd37e0a
Contents?: true
Size: 706 Bytes
Versions: 12
Compression:
Stored size: 706 Bytes
Contents
require 'rails_admin/config/fields/base' require 'rails_admin/config/fields/types/file_upload' module RailsAdmin module Config module Fields module Types class Refile < RailsAdmin::Config::Fields::Types::FileUpload RailsAdmin::Config::Fields::Types.register(self) register_instance_option :thumb_method do [:limit, 100, 100] end register_instance_option :delete_method do "remove_#{name}" end def resource_url(thumb = []) return nil unless value Object.const_get(:Refile).attachment_url(bindings[:object], name, *thumb) end end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems