-
Notifications
You must be signed in to change notification settings - Fork 11
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
fix 'Calculator' page reverting after changing locale #928
Conversation
@@ -1,5 +1,6 @@ | |||
<div class="container"> | |||
<%= simple_form_for @calculator, url: account_calculators_path do |f| %> | |||
<%= hidden_field_tag :rendered_from, "new" %> |
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.
не гуд, таких форм у тебе рахуй 10 і на кожну потрібна перевірка?) не гуд, шукай інший солюшен, більш лайтовий
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #928 +/- ##
========================================
Coverage 91.16% 91.16%
========================================
Files 70 70
Lines 973 973
========================================
Hits 887 887
Misses 86 86 ☔ View full report in Codecov by Sentry. |
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.
Fix ci
@@ -0,0 +1 @@ | |||
<div data-controller="redirect" data-url="<%= account_calculators_path %>"></div> |
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.
turbo_stream.append :body_js do
<script>
window.location.replace("<%= account_calculators_path %>")
</script>
end
@@ -0,0 +1 @@ | |||
<%= turbo_stream.replace(dom_id(@calculator, :form), partial: "account/calculators/partials/new/form", locals: {calculator: @calculator}) %> |
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.
<%= turbo_stream.replace(dom_id(@calculator, :form), partial: "account/calculators/partials/new/form", locals: {calculator: @calculator}) %> | |
<%= turbo_stream.replace(dom_id(@calculator, :form), partial: "account/calculators/partials/new/form", locals: { calculator: @calculator }) %> | |
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.
а це можна видаляти
03a3caf
to
7d2dc81
Compare
dev
PROJECT
Board ticket
Code reviewers
Summary of issue
New calculator is not creating because of validation failed. Error message is shown. If change locale on this stage, admin will be redirected to Calculator's page.
Expected result
'New calculator' page is reload and displayed.
'Name' field is blank.
Error message is absent.
Summary of change
fix.reverting.mp4
CHECK LIST