forked from VaneCode/recipe_app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
59 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,31 @@ | ||
<h2>Log in</h2> | ||
<div> | ||
<h2>Log in Page</h2> | ||
|
||
<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %> | ||
<div class="field"> | ||
<%= f.label :email %><br /> | ||
<%= f.email_field :email, autofocus: true, autocomplete: "email" %> | ||
<div class="form-group"> | ||
<%= f.label :email %> | ||
<%= f.email_field :email, autofocus: true, autocomplete: "email", class: "form-control" %> | ||
</div> | ||
|
||
<div class="field"> | ||
<%= f.label :password %><br /> | ||
<%= f.password_field :password, autocomplete: "current-password" %> | ||
<div class="form-group"> | ||
<br/> | ||
<%= f.label :password %> | ||
<%= f.password_field :password, autocomplete: "current-password", class: "form-control"%> | ||
</div> | ||
|
||
<% if devise_mapping.rememberable? %> | ||
<div class="field"> | ||
<%= f.check_box :remember_me %> | ||
<%= f.label :remember_me %> | ||
<div class="form-group"> | ||
<br/> | ||
<%= f.check_box :remember_me %> Remember me | ||
<!--%# <%= f.label :remember_me %> % --> | ||
</div> | ||
<% end %> | ||
|
||
<div class="actions"> | ||
<%= f.submit "Log in" %> | ||
<br/> | ||
<%= f.submit "Log in", class: "btn btn-primary" %> | ||
</div> | ||
</div> | ||
<% end %> | ||
|
||
<%= render "devise/shared/links" %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
<p style="color: green"><%= notice %></p> | ||
|
||
<%= render @food %> | ||
|
||
<div> | ||
<div class="d-flex justify-content-center gap-3 container-lg mt-3 mb-3"> | ||
<%= link_to "Edit this food", edit_food_path(@food) %> | | ||
<%= link_to "Back to foods", foods_path %> | ||
<%= link_to "Back to foods", new_food_path, class: "btn btn-primary" %> | ||
|
||
<%= button_to "Destroy this food", @food, method: :delete %> | ||
<%= button_to "Confirm to delete", @food, method: :delete, class: "btn btn-danger"%> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,40 +6,40 @@ | |
# movies = Movie.create([{ name: "Star Wars" }, { name: "Lord of the Rings" }]) | ||
# Character.create(name: "Luke", movie: movies.first) | ||
|
||
wayuni = User.create(name: 'wayungi' email: '[email protected]', password:'123456') | ||
obella = User.create(name: 'obella', email: '[email protected]', password:'123456') | ||
kibuuka = User.create(name: 'kibuuka', email: '[email protected]', password:'123456') | ||
mahooro = User.create(name: 'mahooro', email: '[email protected]', password:'123456') | ||
anzoyo = User.create(name: 'anzoyo', email: '[email protected]', password:'123456') | ||
sali = User.create(name: 'sali', email: '[email protected]', password:'123456') | ||
# wayuni = User.create(name: 'wayungi' email: '[email protected]', password:'123456') | ||
# obella = User.create(name: 'obella', email: '[email protected]', password:'123456') | ||
# kibuuka = User.create(name: 'kibuuka', email: '[email protected]', password:'123456') | ||
# mahooro = User.create(name: 'mahooro', email: '[email protected]', password:'123456') | ||
# anzoyo = User.create(name: 'anzoyo', email: '[email protected]', password:'123456') | ||
# sali = User.create(name: 'sali', email: '[email protected]', password:'123456') | ||
|
||
akora = Inventory.create(name:'Akora', description: 'Delicious staple foodfor the people of West Nile (Uganda)', user: wayungi) | ||
dekngor = Inventory.create(name:'Dek Ngor', description: 'Boiled Amur beans mixed with landi', user: wayungi) | ||
angara = Inventory.create(name:'Angara', description: 'Big fresh nile water fish, shinny and fatty, fried with its own fats', user: wayungi) | ||
# akora = Inventory.create(name:'Akora', description: 'Delicious staple foodfor the people of West Nile (Uganda)', user: wayungi) | ||
# dekngor = Inventory.create(name:'Dek Ngor', description: 'Boiled Amur beans mixed with landi', user: wayungi) | ||
# angara = Inventory.create(name:'Angara', description: 'Big fresh nile water fish, shinny and fatty, fried with its own fats', user: wayungi) | ||
|
||
luwombo = Inventory.create(name:'Luwombo', description: 'Chicken cooked in Ndagala', user: sali) | ||
shawama = Inventory.create(name:'Shawama', description: 'Conconction of chips + chicken & wheat', user: sali) | ||
lekuki = Inventory.create(name:'Lekuki', description: 'Wid lased kuki iten 1 pa de', user: sali) | ||
# luwombo = Inventory.create(name:'Luwombo', description: 'Chicken cooked in Ndagala', user: sali) | ||
# shawama = Inventory.create(name:'Shawama', description: 'Conconction of chips + chicken & wheat', user: sali) | ||
# lekuki = Inventory.create(name:'Lekuki', description: 'Wid lased kuki iten 1 pa de', user: sali) | ||
|
||
# --------------------------------------------------------------------------- | ||
oboo = Food.create(name: 'Oboo', measurement_unit: 'Bundle', price: 500) | ||
rec = Food.create(name: 'Rec', measurement_unit: 'Piece', price: 15000) | ||
odii = Food.create(name: 'Odii', measurement_unit: 'Kg', price: 10000) | ||
oboo = Food.create(name: 'Oboo', measurement_unit: 'Bundle', price: 500) | ||
beans = Food.create(name: 'Beans', measurement_unit: 'Kg', price: 3600) | ||
moo = Food.create(name: 'Moo', measurement_unit: 'Litre', price: 8000) | ||
yao = Food.create(name: 'Yao', measurement_unit: 'Litre', price: 12000) | ||
# # --------------------------------------------------------------------------- | ||
# oboo = Food.create(name: 'Oboo', measurement_unit: 'Bundle', price: 500) | ||
# rec = Food.create(name: 'Rec', measurement_unit: 'Piece', price: 15000) | ||
# odii = Food.create(name: 'Odii', measurement_unit: 'Kg', price: 10000) | ||
# oboo = Food.create(name: 'Oboo', measurement_unit: 'Bundle', price: 500) | ||
# beans = Food.create(name: 'Beans', measurement_unit: 'Kg', price: 3600) | ||
# moo = Food.create(name: 'Moo', measurement_unit: 'Litre', price: 8000) | ||
# yao = Food.create(name: 'Yao', measurement_unit: 'Litre', price: 12000) | ||
|
||
|
||
InventoryFood.create(quantity: 8, inventory: akora, food:oboo) | ||
InventoryFood.create(quantity: 2, inventory: akora, food:rec) | ||
InventoryFood.create(quantity: 1, inventory: akora, food:odii) | ||
# InventoryFood.create(quantity: 8, inventory: akora, food:oboo) | ||
# InventoryFood.create(quantity: 2, inventory: akora, food:rec) | ||
# InventoryFood.create(quantity: 1, inventory: akora, food:odii) | ||
|
||
InventoryFood.create(quantity: 1, inventory: dekngor, food:beans) | ||
InventoryFood.create(quantity: 1, inventory: dekngor, food:odii) | ||
# InventoryFood.create(quantity: 1, inventory: dekngor, food:beans) | ||
# InventoryFood.create(quantity: 1, inventory: dekngor, food:odii) | ||
|
||
InventoryFood.create(quantity: 4, inventory: angara, food:rec) | ||
InventoryFood.create(quantity: 50, inventory: angara, food:moo) | ||
# InventoryFood.create(quantity: 4, inventory: angara, food:rec) | ||
# InventoryFood.create(quantity: 50, inventory: angara, food:moo) | ||
|
||
#Users | ||
#5.times do | ||
|