paperclip_database 2.2.2 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -2
  3. data/.rspec +1 -1
  4. data/.travis.yml +4 -3
  5. data/Appraisals +14 -10
  6. data/README.md +7 -5
  7. data/Rakefile +6 -10
  8. data/features/basic_integration.feature +2 -2
  9. data/features/step_definitions/html_steps.rb +2 -2
  10. data/features/step_definitions/rails_steps.rb +2 -2
  11. data/features/step_definitions/web_steps.rb +4 -98
  12. data/gemfiles/rails30_paperclip23.gemfile +2 -2
  13. data/gemfiles/rails30_paperclip2x.gemfile +2 -2
  14. data/gemfiles/rails30_paperclip30.gemfile +2 -2
  15. data/gemfiles/rails30_paperclip3x.gemfile +2 -2
  16. data/gemfiles/rails31_paperclip23.gemfile +2 -2
  17. data/gemfiles/rails31_paperclip2x.gemfile +2 -2
  18. data/gemfiles/rails31_paperclip30.gemfile +2 -2
  19. data/gemfiles/rails31_paperclip3x.gemfile +2 -2
  20. data/gemfiles/rails32_paperclip23.gemfile +2 -2
  21. data/gemfiles/rails32_paperclip2x.gemfile +2 -2
  22. data/gemfiles/rails32_paperclip30.gemfile +2 -2
  23. data/gemfiles/rails32_paperclip3x.gemfile +2 -2
  24. data/gemfiles/rails32_paperclip40.gemfile +2 -2
  25. data/gemfiles/rails32_paperclip4x.gemfile +2 -2
  26. data/gemfiles/rails40_paperclip42.gemfile +10 -0
  27. data/gemfiles/rails40_paperclip4x.gemfile +4 -3
  28. data/gemfiles/rails41_paperclip42.gemfile +9 -0
  29. data/gemfiles/rails41_paperclip4x.gemfile +9 -0
  30. data/lib/generators/paperclip_database/migration/migration_generator.rb +0 -2
  31. data/lib/paperclip/storage/database.rb +47 -32
  32. data/lib/paperclip_database/version.rb +1 -1
  33. data/lib/paperclip_database.rb +0 -1
  34. data/paperclip_database.gemspec +4 -3
  35. data/{test → spec}/database.yml +0 -0
  36. data/spec/default_options_spec.rb +74 -0
  37. data/{test → spec}/fixtures/5k.png +0 -0
  38. data/spec/major_version_API_spec.rb +85 -0
  39. data/spec/namespaced_models_spec.rb +39 -0
  40. data/spec/single_table_inheritance_spec.rb +39 -0
  41. data/spec/spec_helper.rb +81 -1
  42. metadata +22 -22
  43. data/gemfiles/rails40_paperclip34.gemfile +0 -9
  44. data/gemfiles/rails40_paperclip3x.gemfile +0 -9
  45. data/gemfiles/rails40_paperclip40.gemfile +0 -9
  46. data/lib/paperclip_database/deconstantize.rb +0 -11
  47. data/spec/paperclip_database_spec.rb +0 -7
  48. data/test/namespaced_models_test.rb +0 -54
  49. data/test/test_helper.rb +0 -101
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 654fa1e438f9fadcf44928b5647042234f6c6579
4
- data.tar.gz: 63ac11d032c0c8cf77ebcc2dfb0353c4fbd71cbc
3
+ metadata.gz: cfe008fb0a854193ec05d861183921b701c39792
4
+ data.tar.gz: 96c9078fbc881ffb26a84025a8cec507ada14bba
5
5
  SHA512:
6
- metadata.gz: e790ed0d73796a74a802b9ccdd412065ba4f2d8fc1b9b5b35ad09197821a4ce612959a736745777e1276b0fb86ff1e77c09e780d4642d024fcaeefa0c86c39e8
7
- data.tar.gz: 92a5835976253d91dc37424c85f016e522617882bb8edc11f6a954fc6c923769dd30e3c7704f1ba35b18fdce1455d55a63f0fd54a66f9248b5fac548fe0612a0
6
+ metadata.gz: bf69777dec19e8c447b8be26339910658059643f535c864859b9b9c1426b682653e8a6e2c917a4bd982524c6947cf989d8e6ed0e938a02c6093bc9d5418ac656
7
+ data.tar.gz: 52b37c509f81772b957e1b72cb727b6f2d531c85e63c22a13d61081b107647e7e7e7f3fb05c29a79322edf95a0cd9ae37342ec2cc5f798464dd4de50a9625a39
data/.gitignore CHANGED
@@ -21,9 +21,9 @@ pkg
21
21
  *emfile.lock
22
22
 
23
23
  # Test suite generated
24
- test/debug.log
24
+ spec/debug.log
25
25
 
26
- # Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
26
+ # Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
27
27
  #
28
28
  # * Create a file at ~/.gitignore
29
29
  # * Include files you want ignored
data/.rspec CHANGED
@@ -1 +1 @@
1
- --color
1
+ --color --format doc
data/.travis.yml CHANGED
@@ -3,6 +3,7 @@ rvm:
3
3
  - 1.9.3
4
4
  - 2.0.0
5
5
  - 2.1.1
6
+ - 2.1.2
6
7
  gemfile:
7
8
  - gemfiles/rails30_paperclip23.gemfile
8
9
  - gemfiles/rails30_paperclip2x.gemfile
@@ -18,7 +19,7 @@ gemfile:
18
19
  - gemfiles/rails32_paperclip3x.gemfile
19
20
  - gemfiles/rails32_paperclip40.gemfile
20
21
  - gemfiles/rails32_paperclip4x.gemfile
21
- - gemfiles/rails40_paperclip34.gemfile
22
- - gemfiles/rails40_paperclip3x.gemfile
23
- - gemfiles/rails40_paperclip40.gemfile
22
+ - gemfiles/rails40_paperclip42.gemfile
24
23
  - gemfiles/rails40_paperclip4x.gemfile
24
+ - gemfiles/rails41_paperclip42.gemfile
25
+ - gemfiles/rails41_paperclip4x.gemfile
data/Appraisals CHANGED
@@ -91,26 +91,30 @@ end
91
91
 
92
92
  ## Rails 4.0
93
93
 
94
- appraise "rails40_paperclip34" do
94
+ appraise "rails40_paperclip42" do
95
95
  gem "rails", "~> 4.0.0"
96
- gem "paperclip", "~> 3.4.0"
96
+ gem "minitest", "~> 4.2"
97
+ gem "paperclip", "~> 4.2.0"
97
98
  gem "paperclip_database", :path => "../"
98
99
  end
99
100
 
100
- appraise "rails40_paperclip3x" do
101
+ appraise "rails40_paperclip4x" do
101
102
  gem "rails", "~> 4.0.0"
102
- gem "paperclip", "~> 3.0"
103
+ gem "minitest", "~> 4.2"
104
+ gem "paperclip", "~> 4.2"
103
105
  gem "paperclip_database", :path => "../"
104
106
  end
105
107
 
106
- appraise "rails40_paperclip40" do
107
- gem "rails", "~> 4.0.0"
108
- gem "paperclip", "~> 4.0.0"
108
+ ## Rails 4.1
109
+
110
+ appraise "rails41_paperclip42" do
111
+ gem "rails", "~> 4.1.0"
112
+ gem "paperclip", "~> 4.2.0"
109
113
  gem "paperclip_database", :path => "../"
110
114
  end
111
115
 
112
- appraise "rails40_paperclip4x" do
113
- gem "rails", "~> 4.0.0"
114
- gem "paperclip", "~> 4.0"
116
+ appraise "rails41_paperclip4x" do
117
+ gem "rails", "~> 4.1.0"
118
+ gem "paperclip", "~> 4.2"
115
119
  gem "paperclip_database", :path => "../"
116
120
  end
data/README.md CHANGED
@@ -2,11 +2,12 @@ Paperclip Database Storage
2
2
  ==========================
3
3
 
4
4
  [![Build Status](https://travis-ci.org/softace/paperclip_database.png)](http://travis-ci.org/softace/paperclip_database)
5
+ [![Gem Version](https://badge.fury.io/rb/paperclip_database.svg)](http://badge.fury.io/rb/paperclip_database)
5
6
  [![Dependency Status](https://gemnasium.com/softace/paperclip_database.png)](https://gemnasium.com/softace/paperclip_database)
6
7
  [![Code Climate](https://codeclimate.com/github/softace/paperclip_database.png)](https://codeclimate.com/github/softace/paperclip_database)
7
8
 
8
9
  Paperclip Database Storage is an additional storage option for
9
- Paperclip. It give you the opportunity to store your paperclip binary
10
+ Paperclip. It gives you the opportunity to store your paperclip binary
10
11
  file uploads in the database along with all your other data.
11
12
 
12
13
  Requirements
@@ -43,7 +44,7 @@ Supported Versions
43
44
  ------------------
44
45
 
45
46
  As of version 2.0, Rails 2 is no longer supported.
46
- Supported version are rails >= 3.0 and paperclip version >= 2.5
47
+ Supported version are rails >= 3.0 and paperclip version >= 2.3
47
48
 
48
49
  Quick Start
49
50
  -----------
@@ -93,9 +94,10 @@ To start develop, please download the source code
93
94
  When downloaded, you can start issuing the commands like
94
95
 
95
96
  bundle install
96
- bundle exec rake appraisal:gemfiles
97
- bundle exec rake appraisal:install
98
- bundle exec rake all
97
+ bundle exec appraisal clean
98
+ bundle exec appraisal generate
99
+ bundle exec appraisal install
100
+ bundle exec appraisal rake
99
101
 
100
102
  Or you can see what other options are there:
101
103
 
data/Rakefile CHANGED
@@ -1,6 +1,6 @@
1
1
  require 'bundler/gem_tasks'
2
2
  require 'appraisal'
3
- require 'rake/testtask'
3
+ require 'rspec/core/rake_task'
4
4
  require 'cucumber/rake/task'
5
5
 
6
6
  desc 'Default: clean, appraisal:install, all.'
@@ -9,19 +9,17 @@ task :default => [:clean, :all]
9
9
  desc 'Test the paperclip_database plugin under all supported Rails versions.'
10
10
  task :all do |t|
11
11
  if ENV['BUNDLE_GEMFILE']
12
- exec('rake test cucumber')
12
+ exec('rake spec cucumber')
13
13
  else
14
+ exec("rm gemfiles/*.lock")
15
+ Rake::Task["appraisal:gemfiles"].execute
14
16
  Rake::Task["appraisal:install"].execute
15
- exec('rake appraisal test cucumber')
17
+ exec('rake appraisal')
16
18
  end
17
19
  end
18
20
 
19
21
  desc 'Test the paperclip_database plugin.'
20
- Rake::TestTask.new(:test) do |t|
21
- t.libs << 'lib' << 'profile'
22
- t.pattern = 'test/**/*_test.rb'
23
- t.verbose = true
24
- end
22
+ RSpec::Core::RakeTask.new(:spec)
25
23
 
26
24
  desc 'Run integration test'
27
25
  Cucumber::Rake::Task.new do |t|
@@ -40,7 +38,5 @@ task :clean do |t|
40
38
  FileUtils.rm_rf "tmp"
41
39
  FileUtils.rm_rf "pkg"
42
40
  FileUtils.rm_rf "public"
43
- FileUtils.rm "test/debug.log" rescue nil
44
- FileUtils.rm "test/paperclip_database.db" rescue nil
45
41
  Dir.glob("paperclip_database-*.gem").each{|f| FileUtils.rm f }
46
42
  end
@@ -38,8 +38,8 @@ Feature: Rails integration
38
38
  And I start the rails application
39
39
  When I go to the new user page
40
40
  And I fill in "Name" with "something"
41
- And I attach the file "test/fixtures/5k.png" to "Avatar"
41
+ And I attach the file "spec/fixtures/5k.png" to "Avatar"
42
42
  And I press "Submit"
43
43
  Then I should see "Name: something"
44
44
  And I should see an image with a path of "/avatar_views/1?style=original"
45
- And the file at "/avatar_views/1?style=original" should be the same as "test/fixtures/5k.png"
45
+ And the file at "/avatar_views/1?style=original" should be the same as "spec/fixtures/5k.png"
@@ -1,5 +1,5 @@
1
1
  Then %r{I should see an image with a path of "([^"]*)"} do |path|
2
- page.should have_css("img[src^='#{path}']")
2
+ expect(page).to have_css("img[src^='#{path}']")
3
3
  end
4
4
 
5
5
  Then %r{^the file at "([^"]*)" is the same as "([^"]*)"$} do |web_file, path|
@@ -11,5 +11,5 @@ Then %r{^the file at "([^"]*)" is the same as "([^"]*)"$} do |web_file, path|
11
11
  page.body
12
12
  end
13
13
  actual.force_encoding("UTF-8") if actual.respond_to?(:force_encoding)
14
- actual.should == expected
14
+ expect(actual).to eq expected
15
15
  end
@@ -151,7 +151,7 @@ Then /^the file at "([^"]*)" should be the same as "([^"]*)"$/ do |web_file, pat
151
151
  visit(web_file)
152
152
  page.source
153
153
  end
154
- actual.should == expected
154
+ expect(actual).to eq expected
155
155
  end
156
156
 
157
157
  When /^I configure the application to use "([^\"]+)" from this project$/ do |name|
@@ -178,7 +178,7 @@ end
178
178
  Then /^the result of "(.*?)" should be the same as "(.*?)"$/ do |rails_expr, path|
179
179
  expected = IO.binread(path)
180
180
  actual = eval "#{rails_expr}"
181
- actual.should == expected
181
+ expect(actual).to eq expected
182
182
  end
183
183
 
184
184
 
@@ -102,105 +102,11 @@ When /^(?:|I )attach the file "([^"]*)" to "([^"]*)"$/ do |path, field|
102
102
  attach_file(field, File.expand_path(path))
103
103
  end
104
104
 
105
- Then /^(?:|I )should see "([^"]*)"$/ do |text|
106
- if page.respond_to? :should
107
- page.should have_content(text)
105
+ Then /^(?:|I )should (not )?see "([^"]*)"$/ do |negate, text|
106
+ if negate
107
+ expect(page).not_to have_content(text)
108
108
  else
109
- assert page.has_content?(text)
110
- end
111
- end
112
-
113
- Then /^(?:|I )should see \/([^\/]*)\/$/ do |regexp|
114
- regexp = Regexp.new(regexp)
115
-
116
- if page.respond_to? :should
117
- page.should have_xpath('//*', :text => regexp)
118
- else
119
- assert page.has_xpath?('//*', :text => regexp)
120
- end
121
- end
122
-
123
- Then /^(?:|I )should not see "([^"]*)"$/ do |text|
124
- if page.respond_to? :should
125
- page.should have_no_content(text)
126
- else
127
- assert page.has_no_content?(text)
128
- end
129
- end
130
-
131
- Then /^(?:|I )should not see \/([^\/]*)\/$/ do |regexp|
132
- regexp = Regexp.new(regexp)
133
-
134
- if page.respond_to? :should
135
- page.should have_no_xpath('//*', :text => regexp)
136
- else
137
- assert page.has_no_xpath?('//*', :text => regexp)
138
- end
139
- end
140
-
141
- Then /^the "([^"]*)" field(?: within (.*))? should contain "([^"]*)"$/ do |field, parent, value|
142
- with_scope(parent) do
143
- field = find_field(field)
144
- if field.value.respond_to? :should
145
- field.value.should =~ /#{value}/
146
- else
147
- assert_match(/#{value}/, field.value)
148
- end
149
- end
150
- end
151
-
152
- Then /^the "([^"]*)" field(?: within (.*))? should not contain "([^"]*)"$/ do |field, parent, value|
153
- with_scope(parent) do
154
- field = find_field(field)
155
- if field.value.respond_to? :should_not
156
- field.value.should_not =~ /#{value}/
157
- else
158
- assert_no_match(/#{value}/, field.value)
159
- end
160
- end
161
- end
162
-
163
- Then /^the "([^"]*)" checkbox(?: within (.*))? should be checked$/ do |label, parent|
164
- with_scope(parent) do
165
- field_checked = find_field(label)['checked']
166
- if field_checked.respond_to? :should
167
- field_checked.should be_true
168
- else
169
- assert field_checked
170
- end
171
- end
172
- end
173
-
174
- Then /^the "([^"]*)" checkbox(?: within (.*))? should not be checked$/ do |label, parent|
175
- with_scope(parent) do
176
- field_checked = find_field(label)['checked']
177
- if field_checked.respond_to? :should
178
- field_checked.should be_false
179
- else
180
- assert !field_checked
181
- end
182
- end
183
- end
184
-
185
- Then /^(?:|I )should be on (.+)$/ do |page_name|
186
- current_path = URI.parse(current_url).path
187
- if current_path.respond_to? :should
188
- current_path.should == path_to(page_name)
189
- else
190
- assert_equal path_to(page_name), current_path
191
- end
192
- end
193
-
194
- Then /^(?:|I )should have the following query string:$/ do |expected_pairs|
195
- query = URI.parse(current_url).query
196
- actual_params = query ? CGI.parse(query) : {}
197
- expected_params = {}
198
- expected_pairs.rows_hash.each_pair{|k,v| expected_params[k] = v.split(',')}
199
-
200
- if actual_params.respond_to? :should
201
- actual_params.should == expected_params
202
- else
203
- assert_equal expected_params, actual_params
109
+ expect(page).to have_content(text)
204
110
  end
205
111
  end
206
112
 
@@ -4,6 +4,6 @@ source "http://rubygems.org"
4
4
 
5
5
  gem "rails", "~> 3.0.0"
6
6
  gem "paperclip", "~> 2.3.0"
7
- gem "paperclip_database", :path=>"../"
7
+ gem "paperclip_database", :path => "../"
8
8
 
9
- gemspec :path=>"../"
9
+ gemspec :path => "../"
@@ -4,6 +4,6 @@ source "http://rubygems.org"
4
4
 
5
5
  gem "rails", "~> 3.0.0"
6
6
  gem "paperclip", "~> 2.3"
7
- gem "paperclip_database", :path=>"../"
7
+ gem "paperclip_database", :path => "../"
8
8
 
9
- gemspec :path=>"../"
9
+ gemspec :path => "../"
@@ -4,6 +4,6 @@ source "http://rubygems.org"
4
4
 
5
5
  gem "rails", "~> 3.0.0"
6
6
  gem "paperclip", "~> 3.0.0"
7
- gem "paperclip_database", :path=>"../"
7
+ gem "paperclip_database", :path => "../"
8
8
 
9
- gemspec :path=>"../"
9
+ gemspec :path => "../"
@@ -4,6 +4,6 @@ source "http://rubygems.org"
4
4
 
5
5
  gem "rails", "~> 3.0.0"
6
6
  gem "paperclip", "~> 3.0"
7
- gem "paperclip_database", :path=>"../"
7
+ gem "paperclip_database", :path => "../"
8
8
 
9
- gemspec :path=>"../"
9
+ gemspec :path => "../"
@@ -4,6 +4,6 @@ source "http://rubygems.org"
4
4
 
5
5
  gem "rails", "~> 3.1.0"
6
6
  gem "paperclip", "~> 2.3.0"
7
- gem "paperclip_database", :path=>"../"
7
+ gem "paperclip_database", :path => "../"
8
8
 
9
- gemspec :path=>"../"
9
+ gemspec :path => "../"
@@ -4,6 +4,6 @@ source "http://rubygems.org"
4
4
 
5
5
  gem "rails", "~> 3.1.0"
6
6
  gem "paperclip", "~> 2.3"
7
- gem "paperclip_database", :path=>"../"
7
+ gem "paperclip_database", :path => "../"
8
8
 
9
- gemspec :path=>"../"
9
+ gemspec :path => "../"
@@ -4,6 +4,6 @@ source "http://rubygems.org"
4
4
 
5
5
  gem "rails", "~> 3.1.0"
6
6
  gem "paperclip", "~> 3.0.0"
7
- gem "paperclip_database", :path=>"../"
7
+ gem "paperclip_database", :path => "../"
8
8
 
9
- gemspec :path=>"../"
9
+ gemspec :path => "../"
@@ -4,6 +4,6 @@ source "http://rubygems.org"
4
4
 
5
5
  gem "rails", "~> 3.1.0"
6
6
  gem "paperclip", "~> 3.0"
7
- gem "paperclip_database", :path=>"../"
7
+ gem "paperclip_database", :path => "../"
8
8
 
9
- gemspec :path=>"../"
9
+ gemspec :path => "../"
@@ -4,6 +4,6 @@ source "http://rubygems.org"
4
4
 
5
5
  gem "rails", "~> 3.2.0"
6
6
  gem "paperclip", "~> 2.3.0"
7
- gem "paperclip_database", :path=>"../"
7
+ gem "paperclip_database", :path => "../"
8
8
 
9
- gemspec :path=>"../"
9
+ gemspec :path => "../"
@@ -4,6 +4,6 @@ source "http://rubygems.org"
4
4
 
5
5
  gem "rails", "~> 3.2.0"
6
6
  gem "paperclip", "~> 2.3"
7
- gem "paperclip_database", :path=>"../"
7
+ gem "paperclip_database", :path => "../"
8
8
 
9
- gemspec :path=>"../"
9
+ gemspec :path => "../"
@@ -4,6 +4,6 @@ source "http://rubygems.org"
4
4
 
5
5
  gem "rails", "~> 3.2.0"
6
6
  gem "paperclip", "~> 3.0.0"
7
- gem "paperclip_database", :path=>"../"
7
+ gem "paperclip_database", :path => "../"
8
8
 
9
- gemspec :path=>"../"
9
+ gemspec :path => "../"
@@ -4,6 +4,6 @@ source "http://rubygems.org"
4
4
 
5
5
  gem "rails", "~> 3.2.0"
6
6
  gem "paperclip", "~> 3.0"
7
- gem "paperclip_database", :path=>"../"
7
+ gem "paperclip_database", :path => "../"
8
8
 
9
- gemspec :path=>"../"
9
+ gemspec :path => "../"
@@ -4,6 +4,6 @@ source "http://rubygems.org"
4
4
 
5
5
  gem "rails", "~> 3.2.0"
6
6
  gem "paperclip", "~> 4.0.0"
7
- gem "paperclip_database", :path=>"../"
7
+ gem "paperclip_database", :path => "../"
8
8
 
9
- gemspec :path=>"../"
9
+ gemspec :path => "../"
@@ -4,6 +4,6 @@ source "http://rubygems.org"
4
4
 
5
5
  gem "rails", "~> 3.2.0"
6
6
  gem "paperclip", "~> 4.0"
7
- gem "paperclip_database", :path=>"../"
7
+ gem "paperclip_database", :path => "../"
8
8
 
9
- gemspec :path=>"../"
9
+ gemspec :path => "../"
@@ -0,0 +1,10 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "rails", "~> 4.0.0"
6
+ gem "minitest", "~> 4.2"
7
+ gem "paperclip", "~> 4.2.0"
8
+ gem "paperclip_database", :path => "../"
9
+
10
+ gemspec :path => "../"
@@ -3,7 +3,8 @@
3
3
  source "http://rubygems.org"
4
4
 
5
5
  gem "rails", "~> 4.0.0"
6
- gem "paperclip", "~> 4.0"
7
- gem "paperclip_database", :path=>"../"
6
+ gem "minitest", "~> 4.2"
7
+ gem "paperclip", "~> 4.2"
8
+ gem "paperclip_database", :path => "../"
8
9
 
9
- gemspec :path=>"../"
10
+ gemspec :path => "../"
@@ -0,0 +1,9 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "rails", "~> 4.1.0"
6
+ gem "paperclip", "~> 4.2.0"
7
+ gem "paperclip_database", :path => "../"
8
+
9
+ gemspec :path => "../"
@@ -0,0 +1,9 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "rails", "~> 4.1.0"
6
+ gem "paperclip", "~> 4.2"
7
+ gem "paperclip_database", :path => "../"
8
+
9
+ gemspec :path => "../"
@@ -21,8 +21,6 @@ module PaperclipDatabase
21
21
  migration_template "migration.rb.erb", "db/migrate/#{migration_file_name}"
22
22
  end
23
23
 
24
- protected
25
-
26
24
  def migration_name
27
25
  "create_#{name.underscore.tr('/', '_')}_#{attachment_names.map{|n| n.pluralize}.join('_and_')}"
28
26
  end