aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--railties/lib/rails_generator/commands.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/railties/lib/rails_generator/commands.rb b/railties/lib/rails_generator/commands.rb
index 2da82f545d..aa9bc677ef 100644
--- a/railties/lib/rails_generator/commands.rb
+++ b/railties/lib/rails_generator/commands.rb
@@ -1,6 +1,7 @@
require 'delegate'
require 'optparse'
require 'fileutils'
+require 'digest/md5'
require 'erb'
module Rails
@@ -220,7 +221,7 @@ module Rails
return false if File.directory? destination
source = block_given? ? File.open(source) {|sf| yield(sf)} : IO.read(source)
destination = IO.read(destination)
- source == destination
+ Digest::MD5.hexdigest(source) == Digest::MD5.hexdigest(destination)
end
# Generate a file for a Rails application using an ERuby template.