Kasper Timm Hansen

Joined

210 Experience
2 Lessons Completed
0 Questions Solved

Activity

Posted in Datatables From Scratch Using Hotwire Discussion

presence_in can be nice to quiet down those ternaries and avoid the double params[:sort] which makes the line busy:

params[:sort].presence_in(%w{ name position office age start_date }) || "name"