Class: ActiveRecord::Base

Inherits:
Object show all
Defined in:
lib/stratagem/instrumentation/models/persistence/active_record/extensions.rb,
lib/stratagem/instrumentation/models/persistence/active_record/extensions.rb

Overview

Validations::ClassMethods

Constant Summary collapse

@@removed_validators =
[]

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.existing_instance_idsObject



3
4
5
6
7
8
9
# File 'lib/stratagem/instrumentation/models/persistence/active_record/extensions.rb', line 3

def existing_instance_ids
  begin
    find_by_sql("select id from #{table_name}").map {|i| i.id }
  rescue
    all
  end
end

.removed_methodsObject



15
16
17
# File 'lib/stratagem/instrumentation/models/persistence/active_record/extensions.rb', line 15

def removed_methods
  @@removed_methods
end

.removed_methods=(methods) ⇒ Object



11
12
13
# File 'lib/stratagem/instrumentation/models/persistence/active_record/extensions.rb', line 11

def removed_methods=(methods)
  @@removed_methods = methods
end

.removed_validators=(validators) ⇒ Object



19
20
21
# File 'lib/stratagem/instrumentation/models/persistence/active_record/extensions.rb', line 19

def removed_validators=(validators)
  @@removed_validators = validators
end

Instance Method Details

#removed_validatorsObject

end



49
50
51
# File 'lib/stratagem/instrumentation/models/persistence/active_record/extensions.rb', line 49

def removed_validators
  @@removed_validators
end