acts_as_assets 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@ module ActsAsAssets::AssetsHelper
2
2
 
3
3
  def destroy_path doc, target
4
4
  name = ActiveSupport::Inflector.underscore(doc.class.to_s.split('::').first.singularize)
5
- method = "#{name.pluralize}_assets_destroy_path"
5
+ method = "#{name}_destroy_asset_path"
6
6
  send(method.to_sym, instance_variable_get("@#{name}"), :asset_id => doc.id, :target => target)
7
7
  end
8
8
 
@@ -1,3 +1,3 @@
1
1
  module ActsAsAssets
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -33,12 +33,10 @@ RSpec.configure do |config|
33
33
  t.integer :book_id
34
34
  end
35
35
  Rails.application.routes.draw do
36
- namespace :books do
37
- scope ":book_id/assets" do
38
- get '*type' => 'assets#index', :as => 'assets'
39
- post ':type' => 'assets#create', :as => 'assets_create'
40
- delete ':asset_id' => 'assets#destroy', :as => 'assets_destroy'
41
- end
36
+ scope "books/:book_id/assets/" do
37
+ get '*type' => 'books/assets#index', :as => 'book_assets'
38
+ post '*type' => 'books/assets#create', :as => 'book_create_asset'
39
+ delete ':asset_id' => 'books/assets#destroy', :as => 'book_destroy_asset'
42
40
  end
43
41
  end
44
42
 
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.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-24 00:00:00.000000000Z
12
+ date: 2012-02-27 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &2164406820 !ruby/object:Gem::Requirement
16
+ requirement: &2153968100 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.2.1
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2164406820
24
+ version_requirements: *2153968100
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: paperclip
27
- requirement: &2164406400 !ruby/object:Gem::Requirement
27
+ requirement: &2153967640 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *2164406400
35
+ version_requirements: *2153967640
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: ci_reporter
38
- requirement: &2164405940 !ruby/object:Gem::Requirement
38
+ requirement: &2153966980 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *2164405940
46
+ version_requirements: *2153966980
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: sqlite3
49
- requirement: &2164405520 !ruby/object:Gem::Requirement
49
+ requirement: &2153966520 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *2164405520
57
+ version_requirements: *2153966520
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rspec-rails
60
- requirement: &2164405100 !ruby/object:Gem::Requirement
60
+ requirement: &2153966080 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *2164405100
68
+ version_requirements: *2153966080
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: paperclip
71
- requirement: &2164404680 !ruby/object:Gem::Requirement
71
+ requirement: &2153965640 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *2164404680
79
+ version_requirements: *2153965640
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: shoulda-matchers
82
- requirement: &2164404260 !ruby/object:Gem::Requirement
82
+ requirement: &2153965040 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,7 +87,7 @@ dependencies:
87
87
  version: '0'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *2164404260
90
+ version_requirements: *2153965040
91
91
  description: Manage multiple assets related to a specific model
92
92
  email:
93
93
  - acampolonghi@gmail.com
@@ -167,7 +167,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
167
167
  version: '0'
168
168
  segments:
169
169
  - 0
170
- hash: 2731374473120126523
170
+ hash: -271964698832483561
171
171
  required_rubygems_version: !ruby/object:Gem::Requirement
172
172
  none: false
173
173
  requirements:
@@ -176,7 +176,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
176
176
  version: '0'
177
177
  segments:
178
178
  - 0
179
- hash: 2731374473120126523
179
+ hash: -271964698832483561
180
180
  requirements: []
181
181
  rubyforge_project:
182
182
  rubygems_version: 1.8.10