Refactored has_crud active record