As a named_scope, compiled_this_week will return a collection, even if
it
finds only one record matching its criteria. On a collection, #empty?
will
work. When you call #first or #find(:first) on the collection returned
by
compiled_this_week, you get the first record. #empty? is undefined on
that
record.
Regards,
Craig
–
Craig D.
Mutually Human Software
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.