On Tuesday, May 15, 2012 2:41:33 PM UTC-4, Jeremy Evans wrote:
>
>
>   class Person < Sequel::Model
>     dataset_module do
>       def with_last_initial(initial)
>         where(:last_name.ilike("#{initial}%")).all
>       end
>     end
>   end
>
>   # usage
>   Person.with_last_initial('E')
>

Jeremy,

That much helps a lot. Both the pointer to dataset_module and Symbol#ilike. 
I'd seen plenty of things like :somefield.ilike() in the docs but couldn't 
for the life of me find what class they belonged to. Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sequel-talk/-/DlaGQHSp7QMJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.

Reply via email to