lib/forgery/forgery.rb in forgery-0.3.4 vs lib/forgery/forgery.rb in forgery-0.3.5
- old
+ new
@@ -16,10 +16,10 @@
self.load_paths << File.expand_path(path)
Dir["#{self.load_paths.last}/**/*.rb"].uniq.each { |file| require file }
end
def self.rails_root
- if defined?(Rails)
+ if defined?(Rails) && Rails.respond_to?(:root)
Rails.root.to_s
elsif defined?(RAILS_ROOT)
RAILS_ROOT
end
end