Fixed warnings by rails_best_practices