forked from Sikaopa/bnp
-
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.
added the functionality for owner to Update/delete booking customzi…
…ed the show boat page in function of who is viewing it
- Loading branch information
Showing
7 changed files
with
50 additions
and
7 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,4 1,5 @@ | ||
class UsersController < ApplicationController | ||
def show | ||
end | ||
|
||
end |
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,4 1,4 @@ | ||
class Boat < ApplicationRecord | ||
belongs_to :user | ||
has_many :bookings | ||
has_many :bookings, dependent: :destroy | ||
end |
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 |
---|---|---|
@@ -0,0 1,21 @@ | ||
<div class="container"> | ||
<div class="text-center"> | ||
<h1>Edit Boat: <%=@boat.make%></h1> | ||
</div> | ||
|
||
|
||
<div class = "row mt-5"> | ||
<div class="col-sm-12 col-md-6 mx-auto"> | ||
<%= simple_form_for(@boat) do |f| %> | ||
<%= f.input :make %> | ||
<%= f.input :capacity %> | ||
<%= f.input :color %> | ||
<%= f.input :location %> | ||
<%= f.input :daily_rate %> | ||
<%= f.input :image_url %> | ||
<%= f.button :submit, class:"btn btn-primary mt-3 text-center" %> | ||
<% end %> | ||
<hr> | ||
</div> | ||
</div> | ||
</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
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