Use Hash#find instead of Hash#each/break.
Split out sort_direction() helper method.
Split out build_options() helper function.
Combine two if statements in WorksController#set_author_attributes.
Hoist a condition duped in every branch to the top of WorksController#set_author_attributes.