diff --git a/app/views/foods/_form.html.erb b/app/views/foods/_form.html.erb index f2b1186..e5da297 100644 --- a/app/views/foods/_form.html.erb +++ b/app/views/foods/_form.html.erb @@ -1,33 +1,41 @@ -<%= form_with(model: food) do |form| %> - <% if food.errors.any? %> -
-

<%= pluralize(food.errors.count, "error") %> prohibited this food from being saved:

+
+ <%= form_with(model: food) do |form| %> + <% if food.errors.any? %> +
+

<%= pluralize(food.errors.count, "error") %> prohibited this food from being saved:

-
    - <% food.errors.each do |error| %> -
  • <%= error.full_message %>
  • - <% end %> -
-
- <% end %> + +
+ <% end %> -
- <%= form.label :name, style: "display: block" %> - <%= form.text_field :name %> -
-
- <%= form.label :measurement_unit, style: "display: block" %> - <%= form.text_field :measurement_unit %> -
+ <%#
+ <%= form.label :name, style: "display: block" + <%= form.text_field :name, class: "form-control" +
%> -
- <%= form.label :price, style: "display: block" %> - <%= form.text_field :price %> -
+
+ <%= form.label :name, style: "display: block" %> + <%= form.text_field :name, class: "form-control" %> +
+ +
+ <%= form.label :measurement_unit, style: "display: block" %> + <%= form.text_field :measurement_unit, class: "form-control" %> +
-
-
- <%= form.submit class: "btn btn-primary"%> -
-<% end %> +
+ <%= form.label :price, style: "display: block" %> + <%= form.text_field :price, class: "form-control" %> +
+ +
+
+ <%= form.submit class: "btn btn-primary"%> +
+ <% end %> + diff --git a/app/views/foods/new.html.erb b/app/views/foods/new.html.erb index 173abf4..494b3aa 100644 --- a/app/views/foods/new.html.erb +++ b/app/views/foods/new.html.erb @@ -6,5 +6,5 @@
- <%= link_to "Back to foods", foods_path %> + <%= link_to "Back to foods", foods_path, class: "btn btn-success btn-lg"%>