Currently I am working on a project in rails 4 in which I have a user-page at example.com/username but it only finds the record if i use username in proper case, how can I p
Another option could be:
def self.search(query) where("lower(name) LIKE lower(?)", "%#{query}%") end
This would work in sqlite or in PostgreSQL.