-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move Registration Error Messages to React #10411
base: main
Are you sure you want to change the base?
Conversation
91b2a5d
to
65573a3
Compare
@@ -267,11 +267,12 @@ | |||
<% end %> | |||
<% end %> | |||
|
|||
<% @competition.warnings_for(current_user).each do |field, message| %> | |||
<%= alert :warning, message, note: true %> | |||
<% unless defined?(@skip_warnings )%> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you wrapping this in a defined?
call? The variable @skip_warnings
itself is a boolean, so unless @skip_warnings
should do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that caused the tests to fail? unless @skip_warnings
was my original try, let me try again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interestingly you can't do that because @undefined_variable == false
-> false
I choose to do multiple ifs because it was getting complicated.
Also: is it time to only render the registration requirements in the Panel, or do we want to continue having them on top?