-
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
Save previous calculations of the user in the storage #993
base: calculators-constructor
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## calculators-constructor #993 +/- ##
===========================================================
+ Coverage 86.74% 87.05% +0.30%
===========================================================
Files 68 68
Lines 1056 1058 +2
===========================================================
+ Hits 916 921 +5
+ Misses 140 137 -3 ☔ View full report in Codecov by Sentry. |
app/views/calculators/show.html.erb
Outdated
|
||
<%= turbo_frame_tag "calc-results" %> | ||
<%= turbo_frame_tag "calc-results" do %> | ||
<% if session.dig(:calculation_results, @calculator.slug)&.presence %> |
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.
<% if session.dig(:calculation_results, @calculator.slug)&.presence %> | |
<% if session.dig(:calculation_results, @calculator.slug).present?%> | |
app/views/calculators/show.html.erb
Outdated
<%= turbo_frame_tag "calc-results" %> | ||
<%= turbo_frame_tag "calc-results" do %> | ||
<% if session.dig(:calculation_results, @calculator.slug).present? %> | ||
<%= render "calculators/partials/calculation_results", results: session[:calculation_results][@calculator.slug].map(&:symbolize_keys) %> |
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.
- use
with_indifferent_access
- use
dig
|
…lculations-local-save # Conflicts: # app/views/calculators/show.html.erb
unknown_2024.11.29-15.51.mp4
solves #990
Code reviewers
Summary of issue
Users calculations must be saved in the storage
Summary of change
Added feature to save previous results in the session storage
CHECK LIST