refactor #allow_attribute_action? and revert #defined_attributes_keys change