diff --git a/app/views/fertilizer_trackers/_fertilizer_tracker.html.erb b/app/views/fertilizer_trackers/_fertilizer_tracker.html.erb index 2db55a3..c817d19 100644 --- a/app/views/fertilizer_trackers/_fertilizer_tracker.html.erb +++ b/app/views/fertilizer_trackers/_fertilizer_tracker.html.erb @@ -4,4 +4,30 @@ <%= link_to 'Edit this fertilizer tracker', edit_fertilizer_tracker_path(fertilizer_tracker), class: "rounded-lg py-3 ml-2 px-5 bg-gray-100 inline-block font-medium" %>
<% end %> + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeValue
ID<%= @fertilizer_tracker.id %>
Name<%= @fertilizer_tracker.name %>
Date<%= @fertilizer_tracker.date %>
diff --git a/app/views/fertilizer_trackers/_fertilizer_tracker.json.jbuilder b/app/views/fertilizer_trackers/_fertilizer_tracker.json.jbuilder index 583867b..4751102 100644 --- a/app/views/fertilizer_trackers/_fertilizer_tracker.json.jbuilder +++ b/app/views/fertilizer_trackers/_fertilizer_tracker.json.jbuilder @@ -1,2 +1,2 @@ -json.extract! fertilizer_tracker, :id, :created_at, :updated_at +json.extract! fertilizer_tracker, :id, :name, :date, :created_at, :updated_at json.url fertilizer_tracker_url(fertilizer_tracker, format: :json) diff --git a/app/views/fertilizer_trackers/_form.html.erb b/app/views/fertilizer_trackers/_form.html.erb index fb9ac81..5ccc521 100644 --- a/app/views/fertilizer_trackers/_form.html.erb +++ b/app/views/fertilizer_trackers/_form.html.erb @@ -11,6 +11,9 @@ <% end %> + <%= form.text_field :name %> + <%= form.date_field :date %> +
<%= form.submit class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
diff --git a/app/views/fertilizer_trackers/index.html.erb b/app/views/fertilizer_trackers/index.html.erb index 8a7da0c..f843b23 100644 --- a/app/views/fertilizer_trackers/index.html.erb +++ b/app/views/fertilizer_trackers/index.html.erb @@ -9,6 +9,25 @@
- <%= render @fertilizer_trackers %> + + + + + + + + + + <% @fertilizer_trackers.each do |tracker| %> + + + + + + <% end %> + +
NameDateShow
<%= tracker.name %><%= tracker.date %> + Show +
diff --git a/app/views/fertilizer_trackers/show.html.erb b/app/views/fertilizer_trackers/show.html.erb index 3c5fb37..e5b7862 100644 --- a/app/views/fertilizer_trackers/show.html.erb +++ b/app/views/fertilizer_trackers/show.html.erb @@ -6,10 +6,10 @@ <%= render @fertilizer_tracker %> - <%= link_to 'Edit this fertilizer_tracker', edit_fertilizer_tracker_path(@fertilizer_tracker), class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %> + <%= link_to 'Edit this fertilizer tracker', edit_fertilizer_tracker_path(@fertilizer_tracker), class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
- <%= button_to 'Destroy this fertilizer_tracker', fertilizer_tracker_path(@fertilizer_tracker), method: :delete, class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 font-medium" %> + <%= button_to 'Destroy this fertilizer tracker', fertilizer_tracker_path(@fertilizer_tracker), method: :delete, class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 font-medium" %>
- <%= link_to 'Back to fertilizer_trackers', fertilizer_trackers_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %> + <%= link_to 'Back to fertilizer trackers', fertilizer_trackers_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %> diff --git a/app/views/layouts/index.html.erb b/app/views/layouts/index.html.erb index 088ab3c..7f47246 100644 --- a/app/views/layouts/index.html.erb +++ b/app/views/layouts/index.html.erb @@ -4,4 +4,5 @@
  • >Families
  • >Sunlight Hours
  • >Water tracker
  • +
  • >Fertilizer tracker
  • \ No newline at end of file