I have a serializer with a has_many
association and I want to order the dependent model. For some reason I get an undefined method key?'
error:
class API::ClientSerializer < ActiveModel::Serializer
has_many :check_ins, -> { order(:week) }
end
How else do I order the check_ins by week?