Module: Stratagem::Instrumentation::Models::Authentication::Metadata

Included in:
RestfulAuthentication::Metadata
Defined in:
lib/stratagem/instrumentation/models/authentication/metadata.rb

Overview

prefix method names with to avoid collision

Instance Method Summary collapse

Instance Method Details

#exclude_attributes_for_mockingObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/stratagem/instrumentation/models/authentication/metadata.rb', line 5

def exclude_attributes_for_mocking
  # open id
  attrs = @model.stratagem.attribute_names.select {|a|
    (a =~ /open_id/ || a =~ /openid/ || a =~ /identity_url/)
  }
  attrs << :identity_url
  attrs << :openid_identifier

  # aasm
  if (@model.methods_include?(:aasm_column))
    attrs << @model.aasm_column
  end
  
  attrs.uniq
end