lib/s3_multipart/railtie.rb in s3_multipart-0.0.8 vs lib/s3_multipart/railtie.rb in s3_multipart-0.0.9
- old
+ new
@@ -13,10 +13,10 @@
end
# Load all of the upload controllers in app/uploaders/multipart
initializer "s3_multipart.load_upload_controllers" do
begin
- uploaders = Dir.entries(Rails.root.join('app', 'uploaders', 'multipart').to_s).keep_if {|n| n =~ /[uploader]/}
+ uploaders = Dir.entries(Rails.root.join('app', 'uploaders', 'multipart').to_s).keep_if {|n| n =~ /uploader\.rb$/}
uploaders.each do |uploader|
require "#{Rails.root.join('app', 'uploaders', 'multipart')}/#{uploader}"
end
rescue
# Give some sort of error in the console