Convert RJS files for flexible criteria

(And fix the tests for the new `js.erb` files.)
Line is too long. [83/80]