Optional parameters in scope methods for pagination

2 views
Skip to first unread message

Philipp Kursawe

unread,
Jan 17, 2012, 10:30:19 AM1/17/12
to DataMapper
How would optional scope parameters work?

def self.latest(limit = nil)
all(:limit => limit | 5)
end

Is that the prefered way to do it?
Reply all
Reply to author
Forward
0 new messages