sferik/rails_admin — pull request #1933 by peresleguine (2014-03-14 09:21:11+00:00)
Title: Undefined method `find_by_id' for user instance

Method `username` tries to find user by id. However if user model uses different attribute for the primary key (e.g. `uuid`) the exception will be raised:

![screenshot 2014-03-14 12 50 38](https://f.cloud.github.com/assets/365816/2419138/9be02f08-ab57-11e3-8eca-1e8abf5a6db8.png)

I suggest to change the scope considering this scenario. It will work both in Rails 3 and Rails 4.