Class: Wafflemix::Asset
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Wafflemix::Asset
- Defined in:
- app/models/wafflemix/asset.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
Returns the value of attribute path.
Instance Method Summary collapse
-
#to_jq_upload ⇒ Object
one convenient method to pass jq_upload the necessary information.
Instance Attribute Details
#path ⇒ Object
Returns the value of attribute path.
8 9 10 |
# File 'app/models/wafflemix/asset.rb', line 8 def path @path end |
Instance Method Details
#to_jq_upload ⇒ Object
one convenient method to pass jq_upload the necessary information
11 12 13 14 15 16 17 18 19 20 |
# File 'app/models/wafflemix/asset.rb', line 11 def to_jq_upload { "name" => read_attribute(:asset_name), "size" => asset_size, "url" => asset_url, "thumbnail_url" => asset.thumb('80x80#').url, "delete_url" => Wafflemix::Engine::routes.url_helpers.admin_asset_path(:id => id), "delete_type" => "DELETE" } end |