-
Notifications
You must be signed in to change notification settings - Fork 10
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
Upload the calculator logo #982
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 #982 +/- ##
===========================================================
+ Coverage 89.64% 89.71% +0.06%
===========================================================
Files 69 69
Lines 1111 1118 +7
===========================================================
+ Hits 996 1003 +7
Misses 115 115 ☔ View full report in Codecov by Sentry. |
e4b6ed9
to
4f47f52
Compare
fd63145
to
e3a6762
Compare
…cts/ZeroWaste into 970-ability-upload-logo
…cts/ZeroWaste into 970-ability-upload-logo
@@ -0,0 +1,5 @@ | |||
<% if @calculator.logo_picture.attached? %> | |||
<%= image_tag(@calculator.logo_picture.variant(resize_to_fill: [428, 307])) %> |
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 constant for this dimension definition
app/views/calculators/show.html.erb
Outdated
<% if @calculator.logo_picture.attached? %> | ||
<%= image_tag @calculator.logo_picture, class: "constructor-calculator-scales", alt: t(".image_alt") %> | ||
<% else %> | ||
<%# Default image %> | ||
<%= image_tag "scales.png", class: "constructor-calculator-scales", alt: t(".image_alt") %> | ||
<% end %> |
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.
move logic to get default, or attached image to model
dev
Code reviewers
Summary of issue
The user should be able to upload the calculator logo
Summary of change
CHECK LIST
Show page
Calculator_image.mp4