QueueClassic / queue_classic_admin

An admin interface for QueueClassic
MIT License
23 stars 18 forks source link

ActiveRecord::StatementInvalid when sorting by the "Queue" column #29

Closed abevoelker closed 9 years ago

abevoelker commented 9 years ago

Visit http://localhost:3000/queue_classic_admin/queue_classic_jobs?dir=asc&sort=queue_name to reproduce.

PG::UndefinedColumn: ERROR:  column "queue_name" does not exist
LINE 1: ...assic_jobs".* FROM "queue_classic_jobs"  ORDER BY queue_name...
                                                             ^
: SELECT  "queue_classic_jobs".* FROM "queue_classic_jobs"  ORDER BY queue_name asc NULLS LAST LIMIT 50 OFFSET 0
  Rendered /home/abe/.gem/ruby/2.1.5/gems/queue_classic_admin-0.2.0/app/views/queue_classic_admin/shared/_job_list.html.erb (12.9ms)
  Rendered /home/abe/.gem/ruby/2.1.5/gems/queue_classic_admin-0.2.0/app/views/queue_classic_admin/queue_classic_jobs/index.html.erb within layouts/queue_classic_admin/application (14.3ms)
Completed 500 Internal Server Error in 19ms

I believe it should be looking for the "q_name" column, not "queue_name", right?

Full stacktrace: https://gist.github.com/abevoelker/7ef23b4259cacfbaa1a1

This is with Postgres 9.3.5.

jipiboily commented 9 years ago

Good catch. Fixing now.