-
Notifications
You must be signed in to change notification settings - Fork 26
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
bc613a2
commit 466c0b6
Showing
335 changed files
with
8,729 additions
and
8,403 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
module ApplicationCable | ||
class Channel < ActionCable::Channel::Base | ||
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,3 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
module ApplicationCable | ||
class Connection < ActionCable::Connection::Base | ||
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,8 +1,9 @@ | ||
# frozen_string_literal: true | ||
|
||
class ExportChannel < ApplicationCable::Channel | ||
def subscribed | ||
stream_from "exports_channel_#{params[:uuid]}" | ||
end | ||
|
||
def unsubscribed | ||
end | ||
def unsubscribed; 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,50 +1,53 @@ | ||
class Admin::BarriersController < AdminController | ||
before_action :ensure_admin | ||
before_action :set_barrier, only: [:show, :edit, :update, :destroy] | ||
# frozen_string_literal: true | ||
|
||
def index | ||
@barriers = Barrier.all | ||
end | ||
module Admin | ||
class BarriersController < AdminController | ||
before_action :ensure_admin | ||
before_action :set_barrier, only: %i[show edit update destroy] | ||
|
||
def show | ||
end | ||
def index | ||
@barriers = Barrier.all | ||
end | ||
|
||
def new | ||
@barrier = Barrier.new | ||
end | ||
def show; end | ||
|
||
def edit | ||
end | ||
def new | ||
@barrier = Barrier.new | ||
end | ||
|
||
def edit; end | ||
|
||
def create | ||
@barrier = Barrier.new(barrier_params) | ||
def create | ||
@barrier = Barrier.new(barrier_params) | ||
|
||
if @barrier.save | ||
redirect_to admin_barrier_path(@barrier), notice: 'Barrier was successfully created.' | ||
else | ||
render :new | ||
if @barrier.save | ||
redirect_to admin_barrier_path(@barrier), notice: 'Barrier was successfully created.' | ||
else | ||
render :new | ||
end | ||
end | ||
end | ||
|
||
def update | ||
if @barrier.update(barrier_params) | ||
redirect_to admin_barrier_path(@barrier), notice: 'Barrier was successfully updated.' | ||
else | ||
render :edit | ||
def update | ||
if @barrier.update(barrier_params) | ||
redirect_to admin_barrier_path(@barrier), notice: 'Barrier was successfully updated.' | ||
else | ||
render :edit | ||
end | ||
end | ||
end | ||
|
||
def destroy | ||
@barrier.destroy | ||
redirect_to admin_barriers_url, notice: 'Barrier was successfully destroyed.' | ||
end | ||
def destroy | ||
@barrier.destroy | ||
redirect_to admin_barriers_url, notice: 'Barrier was successfully destroyed.' | ||
end | ||
|
||
private | ||
|
||
private | ||
def set_barrier | ||
@barrier = Barrier.find(params[:id]) | ||
end | ||
|
||
def barrier_params | ||
params.require(:barrier).permit(:name, :description) | ||
end | ||
end | ||
end |
Oops, something went wrong.