-
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
#988 Add color to Calculator #997
#988 Add color to Calculator #997
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## calculators-constructor #997 +/- ##
===========================================================
+ Coverage 87.06% 87.07% +0.01%
===========================================================
Files 68 68
Lines 1059 1060 +1
===========================================================
+ Hits 922 923 +1
Misses 137 137 ☔ View full report in Codecov by Sentry. |
<%= f.input :color, as: :color, label: 'Choose a Color for Calculator Page:', | ||
input_html: { | ||
class: 'form-control form-control-color p-2', | ||
style: 'width: 7rem; height: 3.5rem;' |
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.
інлайн стилі не гуд
@@ -35,6 +36,7 @@ class Calculator < ApplicationRecord | |||
validates :en_name, :uk_name, presence: true | |||
validates :en_name, :uk_name, length: { minimum: 3, maximum: 50 } | |||
validates :slug, presence: true, uniqueness: true | |||
validates :color, format: { with: /\A#[0-9a-fA-F]{6}\z/ } |
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.
а де тести?))
Code reviewers
Second Level Review
Summary of issue
Add color picker to calculator
Summary of change
Added color field in model, created partial for picking color
CHECK LIST