Activity
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"
Save 36% for Black Friday! Save 36% on GoRails for Black Friday! Learn more
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"