Skip to content

Commit

Permalink
Moving ActiveRecord extension call into the rails initialization blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
mrkurt committed Jan 31, 2010
1 parent 6d20ff7 commit a336a9c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/loofah.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,10 @@ def scrub_xml_document(string_or_io, method)
Rails.configuration.after_initialize do
require 'loofah/active_record'
require 'loofah/xss_foliate'
ActiveRecord::Base.extend(Loofah::ActiveRecordExtension)
end
elsif defined? ActiveRecord::Base # rails 2.0
require 'loofah/active_record'
require 'loofah/xss_foliate'
ActiveRecord::Base.extend(Loofah::ActiveRecordExtension)
end
1 change: 0 additions & 1 deletion lib/loofah/active_record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,3 @@ def html_document(attr, options={})
end
end

ActiveRecord::Base.extend(Loofah::ActiveRecordExtension)

0 comments on commit a336a9c

Please sign in to comment.