named_scope :has_valid_sysoid, lambda{|sysoid|
conditions = ["nodesysoid IS NOT NULL AND nodelabel LIKE '%-to-%']
unless sysoid.nil?
conditions[0]<< " AND nodesysoid = ?"
conditions << sysoid
end
{:conditions => conditions, :include => [:ipinterface, :alarm]}
}
> Thanks.
>
> Tryi
Thanks.
Trying to keep the controller simple:
Takes a value or not.
One thing I could do was put he include inside the method call but
where does the param go?
Node.has_valid_sysoid(..)
The scope is working, just trying cut out the duplication.
On Jun 24, 5:57 pm, Philip Hallstrom wrote:
> On
2 matches
Mail list logo