user_url_constrainer.rb 187 Bytes
Newer Older
1 2 3 4
require 'constraints/namespace_url_constrainer'

class UserUrlConstrainer < NamespaceUrlConstrainer
  def find_resource(id)
5
    User.find_by('lower(username) = ?', id.downcase)
6 7
  end
end