lib/ztk/dsl/core/actions/find.rb in ztk-1.6.30 vs lib/ztk/dsl/core/actions/find.rb in ztk-1.7.0
- old
+ new
@@ -21,10 +21,14 @@
ids = [args].flatten
all.select{ |data| ids.include?(data.id) }
end
def first(*args)
- find(*args).first
+ if args.count == 0
+ all.first
+ else
+ find(*args).first
+ end
end
def count
all.count
end