Class: TrimSpacesFor::Hooks

Inherits:
Object
  • Object
show all
Defined in:
lib/trim_spaces_for/hooks.rb

Class Method Summary collapse

Class Method Details

.init!Object



7
8
9
10
11
12
13
14
# File 'lib/trim_spaces_for/hooks.rb', line 7

def self.init!
  ::String.send :include, TrimSpacesFor::StringExtension

  ActiveSupport.on_load(:active_record) do
    require 'trim_spaces_for/active_record_extension'
    ::ActiveRecord::Base.send :include, TrimSpacesFor::ActiveRecordExtension
  end
end