Skip to content

Commit

Permalink
default color
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielVajnagi committed Dec 2, 2024
1 parent f83bc95 commit 4ed51a2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<div class="nested-fields">
<%= 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;' } %>
<%= 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;'
} %>
</div>
2 changes: 1 addition & 1 deletion db/migrate/20241201141708_add_color_to_calculators.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class AddColorToCalculators < ActiveRecord::Migration[7.2]
def change
add_column :calculators, :color, :string, default: "#000000"
add_column :calculators, :color, :string, default: "#8fba3b"
end
end
2 changes: 1 addition & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
t.string "slug"
t.string "uk_name", default: "", null: false
t.string "en_name", default: "", null: false
t.string "color", default: "#000000"
t.string "color", default: "#8ffffb"
t.index ["slug"], name: "index_calculators_on_slug", unique: true
end

Expand Down

0 comments on commit 4ed51a2

Please sign in to comment.