Permalink
Browse files

Add sanity check for Rails 3 and after

  • Loading branch information...
1 parent 6f32bb1 commit 55117be7ae0078fcfed7301e0c7056b91b9928c3 @spastorino spastorino committed Oct 15, 2010
Showing with 3 additions and 1 deletion.
  1. +3 −1 init.rb
View
@@ -1,5 +1,7 @@
unless $gems_rake_task
- if Rails::VERSION::MAJOR <= 2 && Rails::VERSION::MINOR <= 3 && Rails::VERSION::TINY <= 7
+ if Rails::VERSION::MAJOR >= 3
+ $stderr.puts "You don't need to install rails_xss as a plugin for Rails 3 and after."
+ elsif Rails::VERSION::MAJOR <= 2 && Rails::VERSION::MINOR <= 3 && Rails::VERSION::TINY <= 7
$stderr.puts "rails_xss requires Rails 2.3.8 or later. Please upgrade to enable automatic HTML safety."
else
require 'rails_xss'

0 comments on commit 55117be

Please sign in to comment.