* be able to sort dashboard articles (#1837) * remember to escape order clause is arel (#1837) * add back in missing character for created_at (#1837) * use case statement to avoid threat of injection (#1837) * write specs to ensure sorting works for dashboard articles (#1837) * add publish sort options, refactor sort options into articles helper (#1837) * refactor to use model scope (#1837)
7 lines
230 B
JavaScript
7 lines
230 B
JavaScript
function initializeDashboardSort() {
|
|
if (document.getElementById('dashhboard_sort')) {
|
|
document.getElementById('dashhboard_sort').onchange = function() {
|
|
window.location = '/dashboard?sort=' + this.value;
|
|
};
|
|
}
|
|
}
|