-
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
1 parent
7850ee1
commit be37c86
Showing
35 changed files
with
623 additions
and
87 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
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,3 +1,3 @@ | ||
module Acu | ||
VERSION = '2.2.0' | ||
VERSION = '3.0.0' | ||
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,2 @@ | ||
// Place all the behaviors and hooks related to the matching controller here. | ||
// All this logic will automatically be available in application.js. |
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,2 @@ | ||
// Place all the behaviors and hooks related to the matching controller here. | ||
// All this logic will automatically be available in application.js. |
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,4 @@ | ||
/* | ||
Place all the styles related to the matching controller here. | ||
They will automatically be included in application.css. | ||
*/ |
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,4 @@ | ||
/* | ||
Place all the styles related to the matching controller here. | ||
They will automatically be included in application.css. | ||
*/ |
58 changes: 58 additions & 0 deletions
58
spec/dummy/app/controllers/admin/booking/chats_controller.rb
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,58 @@ | ||
class Admin::Booking::ChatsController < ApplicationController | ||
before_action :set_admin_booking_chat, only: [:show, :edit, :update, :destroy] | ||
|
||
# GET /admin/booking/chats | ||
def index | ||
@admin_booking_chats = Admin::Booking::Chat.all | ||
end | ||
|
||
# GET /admin/booking/chats/1 | ||
def show | ||
end | ||
|
||
# GET /admin/booking/chats/new | ||
def new | ||
@admin_booking_chat = Admin::Booking::Chat.new | ||
end | ||
|
||
# GET /admin/booking/chats/1/edit | ||
def edit | ||
end | ||
|
||
# POST /admin/booking/chats | ||
def create | ||
@admin_booking_chat = Admin::Booking::Chat.new(admin_booking_chat_params) | ||
|
||
if @admin_booking_chat.save | ||
redirect_to @admin_booking_chat, notice: 'Chat was successfully created.' | ||
else | ||
render :new | ||
end | ||
end | ||
|
||
# PATCH/PUT /admin/booking/chats/1 | ||
def update | ||
if @admin_booking_chat.update(admin_booking_chat_params) | ||
redirect_to @admin_booking_chat, notice: 'Chat was successfully updated.' | ||
else | ||
render :edit | ||
end | ||
end | ||
|
||
# DELETE /admin/booking/chats/1 | ||
def destroy | ||
@admin_booking_chat.destroy | ||
redirect_to admin_booking_chats_url, notice: 'Chat was successfully destroyed.' | ||
end | ||
|
||
private | ||
# Use callbacks to share common setup or constraints between actions. | ||
def set_admin_booking_chat | ||
@admin_booking_chat = Admin::Booking::Chat.find(params[:id]) | ||
end | ||
|
||
# Only allow a trusted parameter "white list" through. | ||
def admin_booking_chat_params | ||
params.require(:admin_booking_chat).permit(:name) | ||
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
class Admin::Booking::ListsController < ApplicationController | ||
# GET /admin/booking/lists | ||
def index | ||
end | ||
|
||
# GET /admin/booking/lists/1 | ||
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
module Admin::Booking::ChatsHelper | ||
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,2 @@ | ||
module Admin::Booking::ListsHelper | ||
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,5 @@ | ||
module Admin::Booking | ||
def self.table_name_prefix | ||
'admin_booking_' | ||
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
class Admin::Booking::Chat < ApplicationRecord | ||
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,2 @@ | ||
class Admin::Booking::List < ApplicationRecord | ||
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,22 @@ | ||
<%= form_for(admin_booking_chat) do |f| %> | ||
<% if admin_booking_chat.errors.any? %> | ||
<div id="error_explanation"> | ||
<h2><%= pluralize(admin_booking_chat.errors.count, "error") %> prohibited this admin_booking_chat from being saved:</h2> | ||
|
||
<ul> | ||
<% admin_booking_chat.errors.full_messages.each do |message| %> | ||
<li><%= message %></li> | ||
<% end %> | ||
</ul> | ||
</div> | ||
<% end %> | ||
|
||
<div class="field"> | ||
<%= f.label :name %> | ||
<%= f.text_field :name %> | ||
</div> | ||
|
||
<div class="actions"> | ||
<%= f.submit %> | ||
</div> | ||
<% 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,6 @@ | ||
<h1>Editing Admin Booking Chat</h1> | ||
|
||
<%= render 'form', admin_booking_chat: @admin_booking_chat %> | ||
|
||
<%= link_to 'Show', @admin_booking_chat %> | | ||
<%= link_to 'Back', admin_booking_chats_path %> |
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,27 @@ | ||
<p id="notice"><%= notice %></p> | ||
|
||
<h1>Admin Booking Chats</h1> | ||
|
||
<table> | ||
<thead> | ||
<tr> | ||
<th>Name</th> | ||
<th colspan="3"></th> | ||
</tr> | ||
</thead> | ||
|
||
<tbody> | ||
<% @admin_booking_chats.each do |admin_booking_chat| %> | ||
<tr> | ||
<td><%= admin_booking_chat.name %></td> | ||
<td><%= link_to 'Show', admin_booking_chat %></td> | ||
<td><%= link_to 'Edit', edit_admin_booking_chat_path(admin_booking_chat) %></td> | ||
<td><%= link_to 'Destroy', admin_booking_chat, method: :delete, data: { confirm: 'Are you sure?' } %></td> | ||
</tr> | ||
<% end %> | ||
</tbody> | ||
</table> | ||
|
||
<br> | ||
|
||
<%= link_to 'New Admin Booking Chat', new_admin_booking_chat_path %> |
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,5 @@ | ||
<h1>New Admin Booking Chat</h1> | ||
|
||
<%= render 'form', admin_booking_chat: @admin_booking_chat %> | ||
|
||
<%= link_to 'Back', admin_booking_chats_path %> |
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,9 @@ | ||
<p id="notice"><%= notice %></p> | ||
|
||
<p> | ||
<strong>Name:</strong> | ||
<%= @admin_booking_chat.name %> | ||
</p> | ||
|
||
<%= link_to 'Edit', edit_admin_booking_chat_path(@admin_booking_chat) %> | | ||
<%= link_to 'Back', admin_booking_chats_path %> |
Oops, something went wrong.