Use Inflector instead of rtrim.