Module: Uploader
- Defined in:
- lib/uploader.rb,
lib/uploader/asset.rb,
lib/uploader/engine.rb,
lib/uploader/version.rb,
lib/uploader/fileuploads.rb,
lib/uploader/helpers/field_tag.rb,
lib/uploader/helpers/form_builder.rb,
lib/uploader/helpers/form_tag_helper.rb,
app/controllers/uploader/attachments_controller.rb
Defined Under Namespace
Modules: Asset, Fileuploads, Helpers
Classes: AttachmentsController, Engine
Constant Summary
collapse
- VERSION =
"0.1.2".freeze
Class Method Summary
collapse
Class Method Details
.assets ⇒ Object
22
23
24
25
26
27
28
|
# File 'lib/uploader.rb', line 22
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
|
.guid ⇒ Object
14
15
16
|
# File 'lib/uploader.rb', line 14
def self.guid
SecureRandom.base64(15).tr('+/=', 'xyz').slice(0, 10)
end
|
.root_path ⇒ Object
18
19
20
|
# File 'lib/uploader.rb', line 18
def self.root_path
@root_path ||= Pathname.new( File.dirname(File.expand_path('../', __FILE__)) )
end
|