Permalink
Browse files

use SecureRandom from ruby instead of ActiveSupport

  • Loading branch information...
1 parent b411b9e commit 9b3da89493932fb1b6e0672f2627abb74378e3a7 @gucki committed Jan 24, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/sequel_paperclip.rb
View
6 lib/sequel_paperclip.rb
@@ -130,11 +130,11 @@ def attachment(name, options)
end
end
- module InstanceMethods
+ module InstanceMethods
def attachment_generate_basename(attachment)
basename = send("#{attachment.name}_basename")
while true
- new_basename = ActiveSupport::SecureRandom.hex(4).to_s
+ new_basename = SecureRandom.hex(4).to_s
return new_basename unless new_basename == basename
end
end
@@ -163,7 +163,7 @@ def after_destroy
end
end
- module DatasetMethods
+ module DatasetMethods
end
end
end

0 comments on commit 9b3da89

Please sign in to comment.