![]() The current approach requires catching exceptions to handle these errors and callers are already handling model validations so it seems more appropriate. Also it seemed to convoluted to add this logic directly to the model since the model needs to check too many possible associations to determine whether or not there are more than one cluster since the model doesn't know what it's being created on. Additionally we only wanted to validate during create to avoid the risk of existing models becoming invalid by many different edge cases. |
||
---|---|---|
.. | ||
application_setting | ||
ci | ||
clusters | ||
concerns | ||
project_policy | ||
award_emoji_policy.rb | ||
base_policy.rb | ||
board_policy.rb | ||
commit_policy.rb | ||
commit_status_policy.rb | ||
container_repository_policy.rb | ||
deploy_key_policy.rb | ||
deploy_token_policy.rb | ||
deployment_policy.rb | ||
environment_policy.rb | ||
external_issue_policy.rb | ||
global_policy.rb | ||
group_label_policy.rb | ||
group_member_policy.rb | ||
group_policy.rb | ||
identity_provider_policy.rb | ||
issuable_policy.rb | ||
issue_policy.rb | ||
merge_request_policy.rb | ||
milestone_policy.rb | ||
namespace_policy.rb | ||
nil_policy.rb | ||
note_policy.rb | ||
personal_snippet_policy.rb | ||
project_label_policy.rb | ||
project_member_policy.rb | ||
project_policy.rb | ||
project_snippet_policy.rb | ||
project_statistics_policy.rb | ||
protected_branch_policy.rb | ||
release_policy.rb | ||
repository_policy.rb | ||
suggestion_policy.rb | ||
user_policy.rb |