force_encoding in one line
do not raise error for boolean conversion
updates for rails 4