Sha256: 24220222f0184f9239ff1f5bb183e736be41dc2dc42bbaac5fbe3cb47c72547f

Contents?: true

Size: 586 Bytes

Versions: 9

Compression:

Stored size: 586 Bytes

Contents

require 'sanitize/rails'

class Sanitize::Railtie < ::Rails::Railtie
  initializer 'sanitize-rails.insert_into_action_view' do
    ActiveSupport.on_load :action_view do
      ActionView::Helpers::SanitizeHelper.instance_eval { include Sanitize::Rails::ActionView }
    end
  end

  initializer 'sanitize-rails.insert_into_active_record' do
    ActiveSupport.on_load :active_record do
      ActiveRecord::Base.extend Sanitize::Rails::ActiveRecord
    end
  end

  initializer 'sanitie-rails.insert_into_string' do
    ::String.instance_eval { include Sanitize::Rails::String }
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
sanitize-rails-0.8.1 lib/sanitize/railtie.rb
sanitize-rails-0.8.0 lib/sanitize/railtie.rb
sanitize-rails-0.7.2 lib/sanitize/railtie.rb
sanitize-rails-0.7.1 lib/sanitize/railtie.rb
sanitize-rails-0.7.0 lib/sanitize/railtie.rb
sanitize-rails-0.6.2 lib/sanitize/railtie.rb
sanitize-rails-0.6.1 lib/sanitize/railtie.rb
sanitize-rails-0.6.0 lib/sanitize/railtie.rb
sanitize-rails-0.5.0 lib/sanitize/railtie.rb