diff options
author | Matthew Landauer <matthew@openaustralia.org> | 2013-01-15 11:09:19 +1100 |
---|---|---|
committer | Matthew Landauer <matthew@openaustralia.org> | 2013-01-15 11:09:19 +1100 |
commit | 4c7dc13b3643349a64011bc13c64fc895f0512e4 (patch) | |
tree | 8d787d40be3e49995a051c99c3f6bcd7541c4c14 /vendor/plugins/rails_xss/init.rb | |
parent | 7ca718bb01c52d36e125afa5870afbd565fb9696 (diff) |
Switch from unofficial rails_xss gem to official rails plugin for rails_xss
Diffstat (limited to 'vendor/plugins/rails_xss/init.rb')
-rw-r--r-- | vendor/plugins/rails_xss/init.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/vendor/plugins/rails_xss/init.rb b/vendor/plugins/rails_xss/init.rb new file mode 100644 index 000000000..533eb1f36 --- /dev/null +++ b/vendor/plugins/rails_xss/init.rb @@ -0,0 +1,9 @@ +unless $gems_rake_task + 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' + end +end |