Commit 04a83107e14efcbfe85f1a7d46b9e4c2efe33c44
1 parent
d0a1fd52
Exists in
master
and in
1 other branch
fix for paperclip webrat step when model is two words
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
features/step_definitions/paperclip_steps.rb
1 | 1 | When /^I attach an? "([^\"]*)" file to an? "([^\"]*)" on S3$/ do |filename, klass| |
2 | 2 | filename = filename.to_sym |
3 | - definition = klass.classify.constantize.attachment_definitions[filename] | |
3 | + definition = klass.gsub(" ", "_").classify.constantize.attachment_definitions[filename] | |
4 | 4 | |
5 | 5 | path = "http://s3.amazonaws.com/:id/#{definition[:path]}" |
6 | 6 | path.gsub!(/:([^\/\.]+)/) do |match| | ... | ... |