sferik/rails_admin — Issue #840: filetype dragonfly does not allow to order
Author: kritik
Created: 2011-11-18 10:07:30+00:00
State: open

I have

config.model UploadFile do
field :operator_type, :enum do
enum_method { :operator_enum }
end
field :file, :dragonfly -- here is considered file_tyoe
field :updated_at, :timestamp
end

model is:

class UploadFile < ActiveRecord::Base
file_accessor :file
end

in the index, when I click to order by file, I get sql error

SQLite3::SQLException: no such column: upload_files.file: SELECT "upload_files".* FROM "upload_files" ORDER BY upload_files.file asc LIMIT 50 OFFSET 0

For me it seems that file should be ordered by file_name
How can I add the hack to the sql?