Feature/rails3 fix block finding

Implements https://www.openproject.org/issues/1875, depends on https://github.com/opf/openproject/pull/402