Class: RailsLens::Analyzers::CompositeKeys
- Defined in:
- lib/rails_lens/analyzers/composite_keys.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Methods included from ErrorHandling
Constructor Details
This class inherits a constructor from RailsLens::Analyzers::Base
Instance Method Details
#analyze ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/rails_lens/analyzers/composite_keys.rb', line 6 def analyze pk = model_class.primary_key return nil unless pk.is_a?(Array) format_composite_keys(pk) rescue ActiveRecord::ConnectionNotEstablished => e RailsLens.logger.debug { "No database connection for #{model_class.name}: #{e.}" } nil end |