Adding Rails model extension for easy usage