fix some codeclimate findings

Both fixes are basically stol.. ahem ... inspired by redmine code ;) thanks for that!

- use Arel for enumeration update
- adapt redmine's approach for the blocks/_calendar partial


see: https://www.openproject.org/work_packages/2660