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