Module: Stratagem::Instrumentation::Models::Authentication::Devise::Instrumentation

Defined in:
lib/stratagem/instrumentation/models/authentication/devise/instrumentation.rb

Class Method Summary collapse

Class Method Details

.included(model) ⇒ Object



3
4
5
6
7
8
9
10
11
12
# File 'lib/stratagem/instrumentation/models/authentication/devise/instrumentation.rb', line 3

def self.included(model)
  model.class_eval do
    before_save { |record| 
      if record.attribute_names.include?('active') 
        puts "activating user"
        record.active = true 
      end
    }
  end
end