我的ActiveRecord模型中有以下行:
class Record < ActiveRecord::Base has_many :users,:through => :record_users,:uniq => true,:order => "record_users.index ASC"
这是为了使我能够以我使用record_users模型中的索引字段订购的方式读出record.users.
ActionView::TemplateError (PGError: ERROR: for SELECT DISTINCT,ORDER BY expressions must appear in select list
有没有办法修复声明使它工作?