You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.
I'd like to be able to sort the associated records count. For example:
# form.rb
class Form
has_many :references
def reference_count
self.references.count
end
end
# reference.rb
class Reference
belongs_to :form
end
#my view
= sort_link @search, :reference_count, 'References'
Is this possible? Or being able to sort the count directly without the virtual attribute.
Thanks!
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'd like to be able to sort the associated records count. For example:
Is this possible? Or being able to sort the count directly without the virtual attribute.
Thanks!
The text was updated successfully, but these errors were encountered: