Module: Sequel::Plugins::DetectUnnecessaryAssociationOptions::ClassMethods
- Defined in:
- lib/sequel/plugins/detect_unnecessary_association_options.rb
Instance Method Summary collapse
-
#detect_unnecessary_association_options ⇒ Object
Check for unnecessary association options.
-
#finalize_associations ⇒ Object
Implicitly check for unnecessary association options when finalizing associations.
Instance Method Details
#detect_unnecessary_association_options ⇒ Object
Check for unnecessary association options.
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/sequel/plugins/detect_unnecessary_association_options.rb', line 67 def @association_reflections.each_value do |ref| meth = "detect_unnecessary_association_options_#{ref[:type]}" # Expected to call private methods. # Ignore unrecognized association types. # External association types can define the appropriate method to # support their own unnecessary association option checks. if respond_to?(meth, true) # All recognized association types need same class check (ref) send(meth, ref) end end nil end |
#finalize_associations ⇒ Object
Implicitly check for unnecessary association options when finalizing associations.
60 61 62 63 64 |
# File 'lib/sequel/plugins/detect_unnecessary_association_options.rb', line 60 def finalize_associations res = super res end |