sferik/rails_admin — Issue #849: Empty history entries causing template error in dashboard
Author: adrianmacneil
Created: 2011-11-21 08:25:06+00:00
State: open

Using latest master (30b4a0ecfee07b3352725a599c8f5a4b4b7fa5ad)

On our production site every time I go to the dashboard (/admin), I get:

A ActionView::Template::Error occurred in main#dashboard:

undefined method `downcase' for nil:NilClass
/data/(app)/shared/bundled_gems/ruby/1.9.1/bundler/gems/rails_admin-30b4a0ecfee0/app/views/rails_admin/history/_dashboard.html.haml:10

On further inspection, this was caused by an entry history entry:

irb(main):001:0> RailsAdmin::History.all
RailsAdmin::History Load (0.3ms) SELECT `rails_admin_histories`.* FROM `rails_admin_histories`
=> [#]

I deleted this, but came back today and the same thing is happening. Why are invalid history entries getting added to the database? I really have no idea where the entries are coming from. Since there is not even a username recorded, I assume this is invalid data. Otherwise _dashboard.html.haml really needs to handle this case.

On a related note, are there any plans to release a stable version number of this gem? Or is everyone going to just keep using random commits from the master branch for the time being?

Thanks for your work so far, it looks like a really nice interface, just need to figure this issue out so we can use it :)