Sha256: 4890da66747296187e0173030d94ef6f2ca0df9c8298dbf3d5cd62fec09dfc74
Contents?: true
Size: 996 Bytes
Versions: 6
Compression:
Stored size: 996 Bytes
Contents
# encoding: utf-8 require 'securerandom' module Uploader autoload :Fileuploads, 'uploader/fileuploads' autoload :Asset, 'uploader/asset' module Helpers autoload :FormTagHelper, 'uploader/helpers/form_tag_helper' autoload :FormBuilder, 'uploader/helpers/form_builder' autoload :FieldTag, 'uploader/helpers/field_tag' end def self.guid SecureRandom.base64(15).tr('+/=', 'xyz').slice(0, 10) end def self.root_path @root_path ||= Pathname.new( File.dirname(File.expand_path('../', __FILE__)) ) end def self.assets ['uploader/application.css', 'uploader/application.js', 'uploader/rails_admin.js'] + Dir[root_path.join('vendor/assets/javascripts/uploader/**', '*.{js,css}')].inject([]) do |list, path| list << Pathname.new(path).relative_path_from(root_path.join('vendor/assets/javascripts')).to_s list end end end require 'uploader/engine' if Object.const_defined?("RailsAdmin") require "uploader/rails_admin/field" end
Version data entries
6 entries across 6 versions & 1 rubygems