Fix warning

Completed with:

- [x] Fixed Rails Best Practices warnings.

Can you please review the code changes? and let me know if any further modifications are required.

Thanks.