extraced some generic methods into generic_controller_helpers module