search for: ipinterfac

Displaying 1 result from an estimated 1 matches for "ipinterfac".

Did you mean: ipinterface
2010 Jun 24
3
DRY a named scope
Is there a way to DRY this up a bit? named_scope :has_valid_sysoid, lambda{|sysoid| (sysoid.nil?) ? {:conditions => ["nodesysoid IS NOT NULL AND nodelabel LIKE ''%-to-%''"], :include => [:ipinterface, :alarm]} : {:conditions => ["nodesysoid IS NOT NULL AND nodelabel LIKE ''%-to-%'' AND nodesysoid = ? ", sysoid], :include => [:ipinterface, :alarm]} } -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk"...