2016-10-06 08:14:24 -04:00
|
|
|
require 'constraints/namespace_url_constrainer'
|
|
|
|
|
|
|
|
class UserUrlConstrainer < NamespaceUrlConstrainer
|
|
|
|
def find_resource(id)
|
2016-10-06 09:59:22 -04:00
|
|
|
User.find_by('lower(username) = ?', id.downcase)
|
2016-10-06 08:14:24 -04:00
|
|
|
end
|
|
|
|
end
|