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
Petr Marek edited this page Oct 14, 2021
·
1 revision
Sort arrows are added automatically for all catalogue attributes when appropriate scopes exist on the model class. Scopes should be named sort_by_CATALOGUE_ATTRIBUTE_asc and sort_by_CATALOGUE_ATTRIBUTE_desc.
To add sorting by :use_count (when using attribute(:use_count) in a catalogue), add the following scopes to your model: