railsadminteam / rails_admin

RailsAdmin is a Rails engine that provides an easy-to-use interface for managing your data
MIT License
7.89k stars 2.26k forks source link

NoMethodError (undefined method `record_count' for #<RailsAdmin::History month: 1, year: 2012>) #913

Closed alecslupu closed 12 years ago

alecslupu commented 12 years ago

in rails_admin / app / models / rails_admin / history.rb : line 23 on activo branch it should be:

    results_two = History.find_by_sql(["select count(*) as record_count, year, month from rails_admin_histories where month IN (?) and year = ? group by year, month",(1..mstop).to_a, ystop])

instead of :

    results_two = History.find_by_sql(["select count(*) as number, year, month from rails_admin_histories where month IN (?) and year = ? group by year, month",(1..mstop).to_a, ystop])

Otherwise would raise the error in the subject

bbenezech commented 12 years ago

Sadly, the Activo branch is not supported anymore (lack of time). Pull request are accepted, though.

Thanks!

gunn commented 11 years ago

Fixed on the activo branch - https://github.com/sferik/rails_admin/tree/activo

sferik commented 11 years ago

@gunn Happy to see you’re keeping the activo branch alive. :wink: I occasionally think about making it the default again.