I have page that shows items in an index.
I’m able to get items by letter using the following:
scope :by_letter, lambda { |letter| where("name LIKE '#{letter}%'") }
But I can’t figure out an elegant solution for names that start with a number (0-9).
How could I rewrite this or a separate scope that would let me search for names starting with a digit?
EDIT: I’m trying to get all rows that start with 0-9 in one go (not separately for each number).
this should work