named_scope and substings
- by Philb28
I have a named_scope in rails that finds episodes by there directors given name
named_scope :director_given, lambda { |dr| {:joins => :director, :conditions => ['given = ?', dr]} }
It works great but I would like it to also work on substrings one the name. e.g. instead of having to search for 'Lucy' you could just search 'Lu'.
P.S.
I…