acts_as_assets 0.3.7 → 0.3.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,7 +8,7 @@ module ActsAsAssets::AssetsHelper
8
8
  end
9
9
 
10
10
  def asset_target model
11
- @type.gsub(/\//, '_') + "_#{model.id.to_s.gsub(/\s/, '_')}"
11
+ @type.gsub(/\//, '_') + "_#{model.id.to_s.parameterize('_').gsub(/\-/, '_')}"
12
12
  end
13
13
 
14
14
  def destroy_path(asset, model, target, type)
@@ -40,7 +40,7 @@ module ActsAsAssets::AssetsHelper
40
40
  end
41
41
 
42
42
  def upload_complete_js_function model
43
- "function(id, fileName, responseJSON, qq){K.allegati.onComplete(id, fileName, responseJSON, qq,'#{asset_target(model)}');}"
43
+ "function(id, fileName, responseJSON, qq){K.allegati.onComplete(id, fileName, responseJSON, qq,'#{asset_action(model)}');}"
44
44
  end
45
45
  def asset_action(model)
46
46
  prefix = model.to_model.class.to_s.underscore.gsub(/\//, '_')
@@ -1,3 +1,3 @@
1
1
  module ActsAsAssets
2
- VERSION = "0.3.7"
2
+ VERSION = "0.3.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_as_assets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.7
4
+ version: 0.3.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-09-05 00:00:00.000000000 Z
13
+ date: 2012-09-06 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -231,7 +231,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
231
231
  version: '0'
232
232
  segments:
233
233
  - 0
234
- hash: 793121603843723602
234
+ hash: 1210599779646501755
235
235
  required_rubygems_version: !ruby/object:Gem::Requirement
236
236
  none: false
237
237
  requirements:
@@ -240,7 +240,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
240
240
  version: '0'
241
241
  segments:
242
242
  - 0
243
- hash: 793121603843723602
243
+ hash: 1210599779646501755
244
244
  requirements: []
245
245
  rubyforge_project:
246
246
  rubygems_version: 1.8.24