From 96b97d691f6889004c38bef15411bc27e448fda1 Mon Sep 17 00:00:00 2001 From: AndrewMurrell Date: Tue, 18 Feb 2014 20:42:51 -0500 Subject: Changes to generate.sh --- app/assets/javascripts/alerts.js.coffee | 3 + app/assets/javascripts/main.js.coffee | 3 + app/assets/javascripts/pms.js.coffee | 3 + app/assets/javascripts/search.js.coffee | 3 + app/assets/stylesheets/alerts.css.scss | 3 + app/assets/stylesheets/main.css.scss | 3 + app/assets/stylesheets/pms.css.scss | 3 + app/assets/stylesheets/search.css.scss | 3 + app/controllers/alerts_controller.rb | 74 ++++++++++++++++++++++ app/controllers/main_controller.rb | 2 + app/controllers/matches_controller.rb | 2 +- app/controllers/pms_controller.rb | 74 ++++++++++++++++++++++ app/controllers/search_controller.rb | 2 + app/controllers/users_controller.rb | 2 +- app/helpers/alerts_helper.rb | 2 + app/helpers/main_helper.rb | 2 + app/helpers/pms_helper.rb | 2 + app/helpers/search_helper.rb | 2 + app/models/alert.rb | 2 + app/models/pm.rb | 2 + app/models/server_settings.rb | 2 + app/models/team_match_pair.rb | 2 + app/models/user_team_pair.rb | 2 + app/views/alerts/_form.html.erb | 25 ++++++++ app/views/alerts/edit.html.erb | 6 ++ app/views/alerts/index.html.erb | 29 +++++++++ app/views/alerts/index.json.jbuilder | 4 ++ app/views/alerts/new.html.erb | 5 ++ app/views/alerts/show.html.erb | 14 ++++ app/views/alerts/show.json.jbuilder | 1 + app/views/matches/_form.html.erb | 4 ++ app/views/matches/index.html.erb | 2 + app/views/matches/index.json.jbuilder | 2 +- app/views/matches/show.html.erb | 5 ++ app/views/matches/show.json.jbuilder | 2 +- app/views/pms/_form.html.erb | 29 +++++++++ app/views/pms/edit.html.erb | 6 ++ app/views/pms/index.html.erb | 31 +++++++++ app/views/pms/index.json.jbuilder | 4 ++ app/views/pms/new.html.erb | 5 ++ app/views/pms/show.html.erb | 19 ++++++ app/views/pms/show.json.jbuilder | 1 + app/views/users/_form.html.erb | 12 ++++ app/views/users/index.html.erb | 6 ++ app/views/users/index.json.jbuilder | 2 +- app/views/users/show.html.erb | 15 +++++ app/views/users/show.json.jbuilder | 2 +- config/routes.rb | 4 ++ db/migrate/20140304014722_create_servers.rb | 8 --- db/migrate/20140304014725_create_tournaments.rb | 8 --- db/migrate/20140304014727_create_matches.rb | 8 --- db/migrate/20140304014729_create_teams.rb | 8 --- db/migrate/20140304014731_create_users.rb | 8 --- db/migrate/20140304014738_create_servers.rb | 8 +++ db/migrate/20140304014740_create_tournaments.rb | 8 +++ db/migrate/20140304014742_create_matches.rb | 9 +++ db/migrate/20140304014745_create_teams.rb | 8 +++ db/migrate/20140304014747_create_users.rb | 11 ++++ .../20140304014749_create_user_team_pairs.rb | 10 +++ .../20140304014751_create_team_match_pairs.rb | 10 +++ db/migrate/20140304014753_create_alerts.rb | 10 +++ db/migrate/20140304014755_create_pms.rb | 11 ++++ .../20140304014757_create_server_settings.rb | 8 +++ db/schema.rb | 41 ------------ generate.sh | 15 +++-- test/controllers/alerts_controller_test.rb | 49 ++++++++++++++ test/controllers/main_controller_test.rb | 7 ++ test/controllers/matches_controller_test.rb | 4 +- test/controllers/pms_controller_test.rb | 49 ++++++++++++++ test/controllers/search_controller_test.rb | 7 ++ test/controllers/users_controller_test.rb | 4 +- test/fixtures/alerts.yml | 9 +++ test/fixtures/matches.yml | 14 ++-- test/fixtures/pms.yml | 11 ++++ test/fixtures/server_settings.yml | 11 ++++ test/fixtures/team_match_pairs.yml | 9 +++ test/fixtures/user_team_pairs.yml | 9 +++ test/fixtures/users.yml | 18 +++--- test/helpers/alerts_helper_test.rb | 4 ++ test/helpers/main_helper_test.rb | 4 ++ test/helpers/pms_helper_test.rb | 4 ++ test/helpers/search_helper_test.rb | 4 ++ test/models/alert_test.rb | 7 ++ test/models/pm_test.rb | 7 ++ test/models/server_settings_test.rb | 7 ++ test/models/team_match_pair_test.rb | 7 ++ test/models/user_team_pair_test.rb | 7 ++ 87 files changed, 761 insertions(+), 113 deletions(-) create mode 100644 app/assets/javascripts/alerts.js.coffee create mode 100644 app/assets/javascripts/main.js.coffee create mode 100644 app/assets/javascripts/pms.js.coffee create mode 100644 app/assets/javascripts/search.js.coffee create mode 100644 app/assets/stylesheets/alerts.css.scss create mode 100644 app/assets/stylesheets/main.css.scss create mode 100644 app/assets/stylesheets/pms.css.scss create mode 100644 app/assets/stylesheets/search.css.scss create mode 100644 app/controllers/alerts_controller.rb create mode 100644 app/controllers/main_controller.rb create mode 100644 app/controllers/pms_controller.rb create mode 100644 app/controllers/search_controller.rb create mode 100644 app/helpers/alerts_helper.rb create mode 100644 app/helpers/main_helper.rb create mode 100644 app/helpers/pms_helper.rb create mode 100644 app/helpers/search_helper.rb create mode 100644 app/models/alert.rb create mode 100644 app/models/pm.rb create mode 100644 app/models/server_settings.rb create mode 100644 app/models/team_match_pair.rb create mode 100644 app/models/user_team_pair.rb create mode 100644 app/views/alerts/_form.html.erb create mode 100644 app/views/alerts/edit.html.erb create mode 100644 app/views/alerts/index.html.erb create mode 100644 app/views/alerts/index.json.jbuilder create mode 100644 app/views/alerts/new.html.erb create mode 100644 app/views/alerts/show.html.erb create mode 100644 app/views/alerts/show.json.jbuilder create mode 100644 app/views/pms/_form.html.erb create mode 100644 app/views/pms/edit.html.erb create mode 100644 app/views/pms/index.html.erb create mode 100644 app/views/pms/index.json.jbuilder create mode 100644 app/views/pms/new.html.erb create mode 100644 app/views/pms/show.html.erb create mode 100644 app/views/pms/show.json.jbuilder delete mode 100644 db/migrate/20140304014722_create_servers.rb delete mode 100644 db/migrate/20140304014725_create_tournaments.rb delete mode 100644 db/migrate/20140304014727_create_matches.rb delete mode 100644 db/migrate/20140304014729_create_teams.rb delete mode 100644 db/migrate/20140304014731_create_users.rb create mode 100644 db/migrate/20140304014738_create_servers.rb create mode 100644 db/migrate/20140304014740_create_tournaments.rb create mode 100644 db/migrate/20140304014742_create_matches.rb create mode 100644 db/migrate/20140304014745_create_teams.rb create mode 100644 db/migrate/20140304014747_create_users.rb create mode 100644 db/migrate/20140304014749_create_user_team_pairs.rb create mode 100644 db/migrate/20140304014751_create_team_match_pairs.rb create mode 100644 db/migrate/20140304014753_create_alerts.rb create mode 100644 db/migrate/20140304014755_create_pms.rb create mode 100644 db/migrate/20140304014757_create_server_settings.rb delete mode 100644 db/schema.rb create mode 100644 test/controllers/alerts_controller_test.rb create mode 100644 test/controllers/main_controller_test.rb create mode 100644 test/controllers/pms_controller_test.rb create mode 100644 test/controllers/search_controller_test.rb create mode 100644 test/fixtures/alerts.yml create mode 100644 test/fixtures/pms.yml create mode 100644 test/fixtures/server_settings.yml create mode 100644 test/fixtures/team_match_pairs.yml create mode 100644 test/fixtures/user_team_pairs.yml create mode 100644 test/helpers/alerts_helper_test.rb create mode 100644 test/helpers/main_helper_test.rb create mode 100644 test/helpers/pms_helper_test.rb create mode 100644 test/helpers/search_helper_test.rb create mode 100644 test/models/alert_test.rb create mode 100644 test/models/pm_test.rb create mode 100644 test/models/server_settings_test.rb create mode 100644 test/models/team_match_pair_test.rb create mode 100644 test/models/user_team_pair_test.rb diff --git a/app/assets/javascripts/alerts.js.coffee b/app/assets/javascripts/alerts.js.coffee new file mode 100644 index 0000000..24f83d1 --- /dev/null +++ b/app/assets/javascripts/alerts.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/javascripts/main.js.coffee b/app/assets/javascripts/main.js.coffee new file mode 100644 index 0000000..24f83d1 --- /dev/null +++ b/app/assets/javascripts/main.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/javascripts/pms.js.coffee b/app/assets/javascripts/pms.js.coffee new file mode 100644 index 0000000..24f83d1 --- /dev/null +++ b/app/assets/javascripts/pms.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/javascripts/search.js.coffee b/app/assets/javascripts/search.js.coffee new file mode 100644 index 0000000..24f83d1 --- /dev/null +++ b/app/assets/javascripts/search.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/stylesheets/alerts.css.scss b/app/assets/stylesheets/alerts.css.scss new file mode 100644 index 0000000..c01a620 --- /dev/null +++ b/app/assets/stylesheets/alerts.css.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the alerts controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/main.css.scss b/app/assets/stylesheets/main.css.scss new file mode 100644 index 0000000..a0d94c1 --- /dev/null +++ b/app/assets/stylesheets/main.css.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the main controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/pms.css.scss b/app/assets/stylesheets/pms.css.scss new file mode 100644 index 0000000..5106093 --- /dev/null +++ b/app/assets/stylesheets/pms.css.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the pms controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/search.css.scss b/app/assets/stylesheets/search.css.scss new file mode 100644 index 0000000..22fd394 --- /dev/null +++ b/app/assets/stylesheets/search.css.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the search controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/controllers/alerts_controller.rb b/app/controllers/alerts_controller.rb new file mode 100644 index 0000000..e6158f4 --- /dev/null +++ b/app/controllers/alerts_controller.rb @@ -0,0 +1,74 @@ +class AlertsController < ApplicationController + before_action :set_alert, only: [:show, :edit, :update, :destroy] + + # GET /alerts + # GET /alerts.json + def index + @alerts = Alert.all + end + + # GET /alerts/1 + # GET /alerts/1.json + def show + end + + # GET /alerts/new + def new + @alert = Alert.new + end + + # GET /alerts/1/edit + def edit + end + + # POST /alerts + # POST /alerts.json + def create + @alert = Alert.new(alert_params) + + respond_to do |format| + if @alert.save + format.html { redirect_to @alert, notice: 'Alert was successfully created.' } + format.json { render action: 'show', status: :created, location: @alert } + else + format.html { render action: 'new' } + format.json { render json: @alert.errors, status: :unprocessable_entity } + end + end + end + + # PATCH/PUT /alerts/1 + # PATCH/PUT /alerts/1.json + def update + respond_to do |format| + if @alert.update(alert_params) + format.html { redirect_to @alert, notice: 'Alert was successfully updated.' } + format.json { head :no_content } + else + format.html { render action: 'edit' } + format.json { render json: @alert.errors, status: :unprocessable_entity } + end + end + end + + # DELETE /alerts/1 + # DELETE /alerts/1.json + def destroy + @alert.destroy + respond_to do |format| + format.html { redirect_to alerts_url } + format.json { head :no_content } + end + end + + private + # Use callbacks to share common setup or constraints between actions. + def set_alert + @alert = Alert.find(params[:id]) + end + + # Never trust parameters from the scary internet, only allow the white list through. + def alert_params + params.require(:alert).permit(:author, :message) + end +end diff --git a/app/controllers/main_controller.rb b/app/controllers/main_controller.rb new file mode 100644 index 0000000..6519d7b --- /dev/null +++ b/app/controllers/main_controller.rb @@ -0,0 +1,2 @@ +class MainController < ApplicationController +end diff --git a/app/controllers/matches_controller.rb b/app/controllers/matches_controller.rb index 4c0c4e4..bb2a67a 100644 --- a/app/controllers/matches_controller.rb +++ b/app/controllers/matches_controller.rb @@ -69,6 +69,6 @@ class MatchesController < ApplicationController # Never trust parameters from the scary internet, only allow the white list through. def match_params - params[:match] + params.require(:match).permit(:tournament) end end diff --git a/app/controllers/pms_controller.rb b/app/controllers/pms_controller.rb new file mode 100644 index 0000000..6eb94f9 --- /dev/null +++ b/app/controllers/pms_controller.rb @@ -0,0 +1,74 @@ +class PmsController < ApplicationController + before_action :set_pm, only: [:show, :edit, :update, :destroy] + + # GET /pms + # GET /pms.json + def index + @pms = Pm.all + end + + # GET /pms/1 + # GET /pms/1.json + def show + end + + # GET /pms/new + def new + @pm = Pm.new + end + + # GET /pms/1/edit + def edit + end + + # POST /pms + # POST /pms.json + def create + @pm = Pm.new(pm_params) + + respond_to do |format| + if @pm.save + format.html { redirect_to @pm, notice: 'Pm was successfully created.' } + format.json { render action: 'show', status: :created, location: @pm } + else + format.html { render action: 'new' } + format.json { render json: @pm.errors, status: :unprocessable_entity } + end + end + end + + # PATCH/PUT /pms/1 + # PATCH/PUT /pms/1.json + def update + respond_to do |format| + if @pm.update(pm_params) + format.html { redirect_to @pm, notice: 'Pm was successfully updated.' } + format.json { head :no_content } + else + format.html { render action: 'edit' } + format.json { render json: @pm.errors, status: :unprocessable_entity } + end + end + end + + # DELETE /pms/1 + # DELETE /pms/1.json + def destroy + @pm.destroy + respond_to do |format| + format.html { redirect_to pms_url } + format.json { head :no_content } + end + end + + private + # Use callbacks to share common setup or constraints between actions. + def set_pm + @pm = Pm.find(params[:id]) + end + + # Never trust parameters from the scary internet, only allow the white list through. + def pm_params + params.require(:pm).permit(:author, :recipient, :message) + end +end diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb new file mode 100644 index 0000000..ee61487 --- /dev/null +++ b/app/controllers/search_controller.rb @@ -0,0 +1,2 @@ +class SearchController < ApplicationController +end diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index da49625..4db617e 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -69,6 +69,6 @@ class UsersController < ApplicationController # Never trust parameters from the scary internet, only allow the white list through. def user_params - params[:user] + params.require(:user).permit(:name, :pw_hash, :groups) end end diff --git a/app/helpers/alerts_helper.rb b/app/helpers/alerts_helper.rb new file mode 100644 index 0000000..20f5b50 --- /dev/null +++ b/app/helpers/alerts_helper.rb @@ -0,0 +1,2 @@ +module AlertsHelper +end diff --git a/app/helpers/main_helper.rb b/app/helpers/main_helper.rb new file mode 100644 index 0000000..826effe --- /dev/null +++ b/app/helpers/main_helper.rb @@ -0,0 +1,2 @@ +module MainHelper +end diff --git a/app/helpers/pms_helper.rb b/app/helpers/pms_helper.rb new file mode 100644 index 0000000..0188e59 --- /dev/null +++ b/app/helpers/pms_helper.rb @@ -0,0 +1,2 @@ +module PmsHelper +end diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb new file mode 100644 index 0000000..b3ce20a --- /dev/null +++ b/app/helpers/search_helper.rb @@ -0,0 +1,2 @@ +module SearchHelper +end diff --git a/app/models/alert.rb b/app/models/alert.rb new file mode 100644 index 0000000..e61a702 --- /dev/null +++ b/app/models/alert.rb @@ -0,0 +1,2 @@ +class Alert < ActiveRecord::Base +end diff --git a/app/models/pm.rb b/app/models/pm.rb new file mode 100644 index 0000000..24d6eb4 --- /dev/null +++ b/app/models/pm.rb @@ -0,0 +1,2 @@ +class Pm < ActiveRecord::Base +end diff --git a/app/models/server_settings.rb b/app/models/server_settings.rb new file mode 100644 index 0000000..7f49863 --- /dev/null +++ b/app/models/server_settings.rb @@ -0,0 +1,2 @@ +class ServerSettings < ActiveRecord::Base +end diff --git a/app/models/team_match_pair.rb b/app/models/team_match_pair.rb new file mode 100644 index 0000000..24a4e86 --- /dev/null +++ b/app/models/team_match_pair.rb @@ -0,0 +1,2 @@ +class TeamMatchPair < ActiveRecord::Base +end diff --git a/app/models/user_team_pair.rb b/app/models/user_team_pair.rb new file mode 100644 index 0000000..7694996 --- /dev/null +++ b/app/models/user_team_pair.rb @@ -0,0 +1,2 @@ +class UserTeamPair < ActiveRecord::Base +end diff --git a/app/views/alerts/_form.html.erb b/app/views/alerts/_form.html.erb new file mode 100644 index 0000000..f0da996 --- /dev/null +++ b/app/views/alerts/_form.html.erb @@ -0,0 +1,25 @@ +<%= form_for(@alert) do |f| %> + <% if @alert.errors.any? %> +
+

<%= pluralize(@alert.errors.count, "error") %> prohibited this alert from being saved:

+ + +
+ <% end %> + +
+ <%= f.label :author %>
+ <%= f.text_field :author %> +
+
+ <%= f.label :message %>
+ <%= f.text_area :message %> +
+
+ <%= f.submit %> +
+<% end %> diff --git a/app/views/alerts/edit.html.erb b/app/views/alerts/edit.html.erb new file mode 100644 index 0000000..ad99164 --- /dev/null +++ b/app/views/alerts/edit.html.erb @@ -0,0 +1,6 @@ +

Editing alert

+ +<%= render 'form' %> + +<%= link_to 'Show', @alert %> | +<%= link_to 'Back', alerts_path %> diff --git a/app/views/alerts/index.html.erb b/app/views/alerts/index.html.erb new file mode 100644 index 0000000..458b951 --- /dev/null +++ b/app/views/alerts/index.html.erb @@ -0,0 +1,29 @@ +

Listing alerts

+ + + + + + + + + + + + + + <% @alerts.each do |alert| %> + + + + + + + + <% end %> + +
AuthorMessage
<%= alert.author %><%= alert.message %><%= link_to 'Show', alert %><%= link_to 'Edit', edit_alert_path(alert) %><%= link_to 'Destroy', alert, method: :delete, data: { confirm: 'Are you sure?' } %>
+ +
+ +<%= link_to 'New Alert', new_alert_path %> diff --git a/app/views/alerts/index.json.jbuilder b/app/views/alerts/index.json.jbuilder new file mode 100644 index 0000000..685157e --- /dev/null +++ b/app/views/alerts/index.json.jbuilder @@ -0,0 +1,4 @@ +json.array!(@alerts) do |alert| + json.extract! alert, :id, :author, :message + json.url alert_url(alert, format: :json) +end diff --git a/app/views/alerts/new.html.erb b/app/views/alerts/new.html.erb new file mode 100644 index 0000000..6d04589 --- /dev/null +++ b/app/views/alerts/new.html.erb @@ -0,0 +1,5 @@ +

New alert

+ +<%= render 'form' %> + +<%= link_to 'Back', alerts_path %> diff --git a/app/views/alerts/show.html.erb b/app/views/alerts/show.html.erb new file mode 100644 index 0000000..eeab7f7 --- /dev/null +++ b/app/views/alerts/show.html.erb @@ -0,0 +1,14 @@ +

<%= notice %>

+ +

+ Author: + <%= @alert.author %> +

+ +

+ Message: + <%= @alert.message %> +

+ +<%= link_to 'Edit', edit_alert_path(@alert) %> | +<%= link_to 'Back', alerts_path %> diff --git a/app/views/alerts/show.json.jbuilder b/app/views/alerts/show.json.jbuilder new file mode 100644 index 0000000..83fe24a --- /dev/null +++ b/app/views/alerts/show.json.jbuilder @@ -0,0 +1 @@ +json.extract! @alert, :id, :author, :message, :created_at, :updated_at diff --git a/app/views/matches/_form.html.erb b/app/views/matches/_form.html.erb index c772c7f..7d0a371 100644 --- a/app/views/matches/_form.html.erb +++ b/app/views/matches/_form.html.erb @@ -11,6 +11,10 @@ <% end %> +
+ <%= f.label :tournament %>
+ <%= f.text_field :tournament %> +
<%= f.submit %>
diff --git a/app/views/matches/index.html.erb b/app/views/matches/index.html.erb index 22ae41e..d8122ac 100644 --- a/app/views/matches/index.html.erb +++ b/app/views/matches/index.html.erb @@ -3,6 +3,7 @@ + @@ -12,6 +13,7 @@ <% @matches.each do |match| %> + diff --git a/app/views/matches/index.json.jbuilder b/app/views/matches/index.json.jbuilder index 08daa52..0839c83 100644 --- a/app/views/matches/index.json.jbuilder +++ b/app/views/matches/index.json.jbuilder @@ -1,4 +1,4 @@ json.array!(@matches) do |match| - json.extract! match, :id + json.extract! match, :id, :tournament json.url match_url(match, format: :json) end diff --git a/app/views/matches/show.html.erb b/app/views/matches/show.html.erb index 453985b..7bab721 100644 --- a/app/views/matches/show.html.erb +++ b/app/views/matches/show.html.erb @@ -1,4 +1,9 @@

<%= notice %>

+

+ Tournament: + <%= @match.tournament %> +

+ <%= link_to 'Edit', edit_match_path(@match) %> | <%= link_to 'Back', matches_path %> diff --git a/app/views/matches/show.json.jbuilder b/app/views/matches/show.json.jbuilder index 7190e4c..a381f65 100644 --- a/app/views/matches/show.json.jbuilder +++ b/app/views/matches/show.json.jbuilder @@ -1 +1 @@ -json.extract! @match, :id, :created_at, :updated_at +json.extract! @match, :id, :tournament, :created_at, :updated_at diff --git a/app/views/pms/_form.html.erb b/app/views/pms/_form.html.erb new file mode 100644 index 0000000..bbc6aee --- /dev/null +++ b/app/views/pms/_form.html.erb @@ -0,0 +1,29 @@ +<%= form_for(@pm) do |f| %> + <% if @pm.errors.any? %> +
+

<%= pluralize(@pm.errors.count, "error") %> prohibited this pm from being saved:

+ + +
+ <% end %> + +
+ <%= f.label :author %>
+ <%= f.text_field :author %> +
+
+ <%= f.label :recipient %>
+ <%= f.text_field :recipient %> +
+
+ <%= f.label :message %>
+ <%= f.text_area :message %> +
+
+ <%= f.submit %> +
+<% end %> diff --git a/app/views/pms/edit.html.erb b/app/views/pms/edit.html.erb new file mode 100644 index 0000000..074a4fd --- /dev/null +++ b/app/views/pms/edit.html.erb @@ -0,0 +1,6 @@ +

Editing pm

+ +<%= render 'form' %> + +<%= link_to 'Show', @pm %> | +<%= link_to 'Back', pms_path %> diff --git a/app/views/pms/index.html.erb b/app/views/pms/index.html.erb new file mode 100644 index 0000000..cb7fe4b --- /dev/null +++ b/app/views/pms/index.html.erb @@ -0,0 +1,31 @@ +

Listing pms

+ +
Tournament
<%= match.tournament %> <%= link_to 'Show', match %> <%= link_to 'Edit', edit_match_path(match) %> <%= link_to 'Destroy', match, method: :delete, data: { confirm: 'Are you sure?' } %>
+ + + + + + + + + + + + + <% @pms.each do |pm| %> + + + + + + + + + <% end %> + +
AuthorRecipientMessage
<%= pm.author %><%= pm.recipient %><%= pm.message %><%= link_to 'Show', pm %><%= link_to 'Edit', edit_pm_path(pm) %><%= link_to 'Destroy', pm, method: :delete, data: { confirm: 'Are you sure?' } %>
+ +
+ +<%= link_to 'New Pm', new_pm_path %> diff --git a/app/views/pms/index.json.jbuilder b/app/views/pms/index.json.jbuilder new file mode 100644 index 0000000..aebdc08 --- /dev/null +++ b/app/views/pms/index.json.jbuilder @@ -0,0 +1,4 @@ +json.array!(@pms) do |pm| + json.extract! pm, :id, :author, :recipient, :message + json.url pm_url(pm, format: :json) +end diff --git a/app/views/pms/new.html.erb b/app/views/pms/new.html.erb new file mode 100644 index 0000000..29e24ec --- /dev/null +++ b/app/views/pms/new.html.erb @@ -0,0 +1,5 @@ +

New pm

+ +<%= render 'form' %> + +<%= link_to 'Back', pms_path %> diff --git a/app/views/pms/show.html.erb b/app/views/pms/show.html.erb new file mode 100644 index 0000000..5ee483f --- /dev/null +++ b/app/views/pms/show.html.erb @@ -0,0 +1,19 @@ +

<%= notice %>

+ +

+ Author: + <%= @pm.author %> +

+ +

+ Recipient: + <%= @pm.recipient %> +

+ +

+ Message: + <%= @pm.message %> +

+ +<%= link_to 'Edit', edit_pm_path(@pm) %> | +<%= link_to 'Back', pms_path %> diff --git a/app/views/pms/show.json.jbuilder b/app/views/pms/show.json.jbuilder new file mode 100644 index 0000000..651e78f --- /dev/null +++ b/app/views/pms/show.json.jbuilder @@ -0,0 +1 @@ +json.extract! @pm, :id, :author, :recipient, :message, :created_at, :updated_at diff --git a/app/views/users/_form.html.erb b/app/views/users/_form.html.erb index 4835056..a7ead1b 100644 --- a/app/views/users/_form.html.erb +++ b/app/views/users/_form.html.erb @@ -11,6 +11,18 @@ <% end %> +
+ <%= f.label :name %>
+ <%= f.text_area :name %> +
+
+ <%= f.label :pw_hash %>
+ <%= f.text_field :pw_hash %> +
+
+ <%= f.label :groups %>
+ <%= f.text_field :groups %> +
<%= f.submit %>
diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index 24a2548..14739ae 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb @@ -3,6 +3,9 @@ + + + @@ -12,6 +15,9 @@ <% @users.each do |user| %> + + + diff --git a/app/views/users/index.json.jbuilder b/app/views/users/index.json.jbuilder index 6684a9c..58c42c1 100644 --- a/app/views/users/index.json.jbuilder +++ b/app/views/users/index.json.jbuilder @@ -1,4 +1,4 @@ json.array!(@users) do |user| - json.extract! user, :id + json.extract! user, :id, :name, :pw_hash, :groups json.url user_url(user, format: :json) end diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 32abeb0..05150f5 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -1,4 +1,19 @@

<%= notice %>

+

+ Name: + <%= @user.name %> +

+ +

+ Pw hash: + <%= @user.pw_hash %> +

+ +

+ Groups: + <%= @user.groups %> +

+ <%= link_to 'Edit', edit_user_path(@user) %> | <%= link_to 'Back', users_path %> diff --git a/app/views/users/show.json.jbuilder b/app/views/users/show.json.jbuilder index 80ed63e..968b383 100644 --- a/app/views/users/show.json.jbuilder +++ b/app/views/users/show.json.jbuilder @@ -1 +1 @@ -json.extract! @user, :id, :created_at, :updated_at +json.extract! @user, :id, :name, :pw_hash, :groups, :created_at, :updated_at diff --git a/config/routes.rb b/config/routes.rb index b954a33..f13c891 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,4 +1,8 @@ Leaguer::Application.routes.draw do + resources :pms + + resources :alerts + resources :users resources :teams diff --git a/db/migrate/20140304014722_create_servers.rb b/db/migrate/20140304014722_create_servers.rb deleted file mode 100644 index f33241a..0000000 --- a/db/migrate/20140304014722_create_servers.rb +++ /dev/null @@ -1,8 +0,0 @@ -class CreateServers < ActiveRecord::Migration - def change - create_table :servers do |t| - - t.timestamps - end - end -end diff --git a/db/migrate/20140304014725_create_tournaments.rb b/db/migrate/20140304014725_create_tournaments.rb deleted file mode 100644 index 2095590..0000000 --- a/db/migrate/20140304014725_create_tournaments.rb +++ /dev/null @@ -1,8 +0,0 @@ -class CreateTournaments < ActiveRecord::Migration - def change - create_table :tournaments do |t| - - t.timestamps - end - end -end diff --git a/db/migrate/20140304014727_create_matches.rb b/db/migrate/20140304014727_create_matches.rb deleted file mode 100644 index 1478e75..0000000 --- a/db/migrate/20140304014727_create_matches.rb +++ /dev/null @@ -1,8 +0,0 @@ -class CreateMatches < ActiveRecord::Migration - def change - create_table :matches do |t| - - t.timestamps - end - end -end diff --git a/db/migrate/20140304014729_create_teams.rb b/db/migrate/20140304014729_create_teams.rb deleted file mode 100644 index dd8397d..0000000 --- a/db/migrate/20140304014729_create_teams.rb +++ /dev/null @@ -1,8 +0,0 @@ -class CreateTeams < ActiveRecord::Migration - def change - create_table :teams do |t| - - t.timestamps - end - end -end diff --git a/db/migrate/20140304014731_create_users.rb b/db/migrate/20140304014731_create_users.rb deleted file mode 100644 index 163109f..0000000 --- a/db/migrate/20140304014731_create_users.rb +++ /dev/null @@ -1,8 +0,0 @@ -class CreateUsers < ActiveRecord::Migration - def change - create_table :users do |t| - - t.timestamps - end - end -end diff --git a/db/migrate/20140304014738_create_servers.rb b/db/migrate/20140304014738_create_servers.rb new file mode 100644 index 0000000..f33241a --- /dev/null +++ b/db/migrate/20140304014738_create_servers.rb @@ -0,0 +1,8 @@ +class CreateServers < ActiveRecord::Migration + def change + create_table :servers do |t| + + t.timestamps + end + end +end diff --git a/db/migrate/20140304014740_create_tournaments.rb b/db/migrate/20140304014740_create_tournaments.rb new file mode 100644 index 0000000..2095590 --- /dev/null +++ b/db/migrate/20140304014740_create_tournaments.rb @@ -0,0 +1,8 @@ +class CreateTournaments < ActiveRecord::Migration + def change + create_table :tournaments do |t| + + t.timestamps + end + end +end diff --git a/db/migrate/20140304014742_create_matches.rb b/db/migrate/20140304014742_create_matches.rb new file mode 100644 index 0000000..288ce6a --- /dev/null +++ b/db/migrate/20140304014742_create_matches.rb @@ -0,0 +1,9 @@ +class CreateMatches < ActiveRecord::Migration + def change + create_table :matches do |t| + t.reference :tournament + + t.timestamps + end + end +end diff --git a/db/migrate/20140304014745_create_teams.rb b/db/migrate/20140304014745_create_teams.rb new file mode 100644 index 0000000..dd8397d --- /dev/null +++ b/db/migrate/20140304014745_create_teams.rb @@ -0,0 +1,8 @@ +class CreateTeams < ActiveRecord::Migration + def change + create_table :teams do |t| + + t.timestamps + end + end +end diff --git a/db/migrate/20140304014747_create_users.rb b/db/migrate/20140304014747_create_users.rb new file mode 100644 index 0000000..3723908 --- /dev/null +++ b/db/migrate/20140304014747_create_users.rb @@ -0,0 +1,11 @@ +class CreateUsers < ActiveRecord::Migration + def change + create_table :users do |t| + t.text :name + t.varchar :pw_hash + t.int :groups + + t.timestamps + end + end +end diff --git a/db/migrate/20140304014749_create_user_team_pairs.rb b/db/migrate/20140304014749_create_user_team_pairs.rb new file mode 100644 index 0000000..3b60212 --- /dev/null +++ b/db/migrate/20140304014749_create_user_team_pairs.rb @@ -0,0 +1,10 @@ +class CreateUserTeamPairs < ActiveRecord::Migration + def change + create_table :user_team_pairs do |t| + t.reference :user + t.reference :team + + t.timestamps + end + end +end diff --git a/db/migrate/20140304014751_create_team_match_pairs.rb b/db/migrate/20140304014751_create_team_match_pairs.rb new file mode 100644 index 0000000..c489495 --- /dev/null +++ b/db/migrate/20140304014751_create_team_match_pairs.rb @@ -0,0 +1,10 @@ +class CreateTeamMatchPairs < ActiveRecord::Migration + def change + create_table :team_match_pairs do |t| + t.reference :team + t.reference :match + + t.timestamps + end + end +end diff --git a/db/migrate/20140304014753_create_alerts.rb b/db/migrate/20140304014753_create_alerts.rb new file mode 100644 index 0000000..6167f33 --- /dev/null +++ b/db/migrate/20140304014753_create_alerts.rb @@ -0,0 +1,10 @@ +class CreateAlerts < ActiveRecord::Migration + def change + create_table :alerts do |t| + t.reference :author + t.text :message + + t.timestamps + end + end +end diff --git a/db/migrate/20140304014755_create_pms.rb b/db/migrate/20140304014755_create_pms.rb new file mode 100644 index 0000000..f3b27fb --- /dev/null +++ b/db/migrate/20140304014755_create_pms.rb @@ -0,0 +1,11 @@ +class CreatePms < ActiveRecord::Migration + def change + create_table :pms do |t| + t.reference :author + t.reference :recipient + t.text :message + + t.timestamps + end + end +end diff --git a/db/migrate/20140304014757_create_server_settings.rb b/db/migrate/20140304014757_create_server_settings.rb new file mode 100644 index 0000000..dfdd91b --- /dev/null +++ b/db/migrate/20140304014757_create_server_settings.rb @@ -0,0 +1,8 @@ +class CreateServerSettings < ActiveRecord::Migration + def change + create_table :server_settings do |t| + + t.timestamps + end + end +end diff --git a/db/schema.rb b/db/schema.rb deleted file mode 100644 index 1f34ab7..0000000 --- a/db/schema.rb +++ /dev/null @@ -1,41 +0,0 @@ -# encoding: UTF-8 -# This file is auto-generated from the current state of the database. Instead -# of editing this file, please use the migrations feature of Active Record to -# incrementally modify your database, and then regenerate this schema definition. -# -# Note that this schema.rb definition is the authoritative source for your -# database schema. If you need to create the application database on another -# system, you should be using db:schema:load, not running all the migrations -# from scratch. The latter is a flawed and unsustainable approach (the more migrations -# you'll amass, the slower it'll run and the greater likelihood for issues). -# -# It's strongly recommended that you check this file into your version control system. - -ActiveRecord::Schema.define(version: 20140304014731) do - - create_table "matches", force: true do |t| - t.datetime "created_at" - t.datetime "updated_at" - end - - create_table "servers", force: true do |t| - t.datetime "created_at" - t.datetime "updated_at" - end - - create_table "teams", force: true do |t| - t.datetime "created_at" - t.datetime "updated_at" - end - - create_table "tournaments", force: true do |t| - t.datetime "created_at" - t.datetime "updated_at" - end - - create_table "users", force: true do |t| - t.datetime "created_at" - t.datetime "updated_at" - end - -end diff --git a/generate.sh b/generate.sh index 95f00cc..28d1936 100755 --- a/generate.sh +++ b/generate.sh @@ -7,12 +7,19 @@ # # - +set -x bundle exec rails generate scaffold server bundle exec rails generate scaffold tournament -bundle exec rails generate scaffold match -bundle exec rails generate scaffold team -bundle exec rails generate scaffold user +bundle exec rails generate scaffold match tournament:reference +bundle exec rails generate scaffold team +bundle exec rails generate scaffold user name:text pw_hash:varchar groups:int +bundle exec rails generate model user_team_pair user:reference team:reference +bundle exec rails generate model team_match_pair team:reference match:reference +bundle exec rails generate scaffold alert author:reference message:text +bundle exec rails generate scaffold pm author:reference recipient:reference message:text +bundle exec rails generate model server_settings +bundle exec rails generate controller search +bundle exec rails generate controller main bundle exec rake db:drop RAILS_ENV=development bundle exec rake db:migrate RAILS_ENV=development #bundle exec rails generate scaffold diff --git a/test/controllers/alerts_controller_test.rb b/test/controllers/alerts_controller_test.rb new file mode 100644 index 0000000..29e58e9 --- /dev/null +++ b/test/controllers/alerts_controller_test.rb @@ -0,0 +1,49 @@ +require 'test_helper' + +class AlertsControllerTest < ActionController::TestCase + setup do + @alert = alerts(:one) + end + + test "should get index" do + get :index + assert_response :success + assert_not_nil assigns(:alerts) + end + + test "should get new" do + get :new + assert_response :success + end + + test "should create alert" do + assert_difference('Alert.count') do + post :create, alert: { author: @alert.author, message: @alert.message } + end + + assert_redirected_to alert_path(assigns(:alert)) + end + + test "should show alert" do + get :show, id: @alert + assert_response :success + end + + test "should get edit" do + get :edit, id: @alert + assert_response :success + end + + test "should update alert" do + patch :update, id: @alert, alert: { author: @alert.author, message: @alert.message } + assert_redirected_to alert_path(assigns(:alert)) + end + + test "should destroy alert" do + assert_difference('Alert.count', -1) do + delete :destroy, id: @alert + end + + assert_redirected_to alerts_path + end +end diff --git a/test/controllers/main_controller_test.rb b/test/controllers/main_controller_test.rb new file mode 100644 index 0000000..b7ec6bf --- /dev/null +++ b/test/controllers/main_controller_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class MainControllerTest < ActionController::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/controllers/matches_controller_test.rb b/test/controllers/matches_controller_test.rb index 353ff4b..629622b 100644 --- a/test/controllers/matches_controller_test.rb +++ b/test/controllers/matches_controller_test.rb @@ -18,7 +18,7 @@ class MatchesControllerTest < ActionController::TestCase test "should create match" do assert_difference('Match.count') do - post :create, match: { } + post :create, match: { tournament: @match.tournament } end assert_redirected_to match_path(assigns(:match)) @@ -35,7 +35,7 @@ class MatchesControllerTest < ActionController::TestCase end test "should update match" do - patch :update, id: @match, match: { } + patch :update, id: @match, match: { tournament: @match.tournament } assert_redirected_to match_path(assigns(:match)) end diff --git a/test/controllers/pms_controller_test.rb b/test/controllers/pms_controller_test.rb new file mode 100644 index 0000000..ccbe7b1 --- /dev/null +++ b/test/controllers/pms_controller_test.rb @@ -0,0 +1,49 @@ +require 'test_helper' + +class PmsControllerTest < ActionController::TestCase + setup do + @pm = pms(:one) + end + + test "should get index" do + get :index + assert_response :success + assert_not_nil assigns(:pms) + end + + test "should get new" do + get :new + assert_response :success + end + + test "should create pm" do + assert_difference('Pm.count') do + post :create, pm: { author: @pm.author, message: @pm.message, recipient: @pm.recipient } + end + + assert_redirected_to pm_path(assigns(:pm)) + end + + test "should show pm" do + get :show, id: @pm + assert_response :success + end + + test "should get edit" do + get :edit, id: @pm + assert_response :success + end + + test "should update pm" do + patch :update, id: @pm, pm: { author: @pm.author, message: @pm.message, recipient: @pm.recipient } + assert_redirected_to pm_path(assigns(:pm)) + end + + test "should destroy pm" do + assert_difference('Pm.count', -1) do + delete :destroy, id: @pm + end + + assert_redirected_to pms_path + end +end diff --git a/test/controllers/search_controller_test.rb b/test/controllers/search_controller_test.rb new file mode 100644 index 0000000..bfbf22d --- /dev/null +++ b/test/controllers/search_controller_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class SearchControllerTest < ActionController::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/controllers/users_controller_test.rb b/test/controllers/users_controller_test.rb index 846e74c..8bcd10b 100644 --- a/test/controllers/users_controller_test.rb +++ b/test/controllers/users_controller_test.rb @@ -18,7 +18,7 @@ class UsersControllerTest < ActionController::TestCase test "should create user" do assert_difference('User.count') do - post :create, user: { } + post :create, user: { groups: @user.groups, name: @user.name, pw_hash: @user.pw_hash } end assert_redirected_to user_path(assigns(:user)) @@ -35,7 +35,7 @@ class UsersControllerTest < ActionController::TestCase end test "should update user" do - patch :update, id: @user, user: { } + patch :update, id: @user, user: { groups: @user.groups, name: @user.name, pw_hash: @user.pw_hash } assert_redirected_to user_path(assigns(:user)) end diff --git a/test/fixtures/alerts.yml b/test/fixtures/alerts.yml new file mode 100644 index 0000000..92ee1b0 --- /dev/null +++ b/test/fixtures/alerts.yml @@ -0,0 +1,9 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + author: + message: MyText + +two: + author: + message: MyText diff --git a/test/fixtures/matches.yml b/test/fixtures/matches.yml index 937a0c0..48c08a5 100644 --- a/test/fixtures/matches.yml +++ b/test/fixtures/matches.yml @@ -1,11 +1,7 @@ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html -# This model initially had no columns defined. If you add columns to the -# model remove the '{}' from the fixture names and add the columns immediately -# below each fixture, per the syntax in the comments below -# -one: {} -# column: value -# -two: {} -# column: value +one: + tournament: + +two: + tournament: diff --git a/test/fixtures/pms.yml b/test/fixtures/pms.yml new file mode 100644 index 0000000..4ad9af3 --- /dev/null +++ b/test/fixtures/pms.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + author: + recipient: + message: MyText + +two: + author: + recipient: + message: MyText diff --git a/test/fixtures/server_settings.yml b/test/fixtures/server_settings.yml new file mode 100644 index 0000000..937a0c0 --- /dev/null +++ b/test/fixtures/server_settings.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +# This model initially had no columns defined. If you add columns to the +# model remove the '{}' from the fixture names and add the columns immediately +# below each fixture, per the syntax in the comments below +# +one: {} +# column: value +# +two: {} +# column: value diff --git a/test/fixtures/team_match_pairs.yml b/test/fixtures/team_match_pairs.yml new file mode 100644 index 0000000..1a81ab4 --- /dev/null +++ b/test/fixtures/team_match_pairs.yml @@ -0,0 +1,9 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + team: + match: + +two: + team: + match: diff --git a/test/fixtures/user_team_pairs.yml b/test/fixtures/user_team_pairs.yml new file mode 100644 index 0000000..bda8bd3 --- /dev/null +++ b/test/fixtures/user_team_pairs.yml @@ -0,0 +1,9 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user: + team: + +two: + user: + team: diff --git a/test/fixtures/users.yml b/test/fixtures/users.yml index 937a0c0..02ffdbb 100644 --- a/test/fixtures/users.yml +++ b/test/fixtures/users.yml @@ -1,11 +1,11 @@ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html -# This model initially had no columns defined. If you add columns to the -# model remove the '{}' from the fixture names and add the columns immediately -# below each fixture, per the syntax in the comments below -# -one: {} -# column: value -# -two: {} -# column: value +one: + name: MyText + pw_hash: + groups: + +two: + name: MyText + pw_hash: + groups: diff --git a/test/helpers/alerts_helper_test.rb b/test/helpers/alerts_helper_test.rb new file mode 100644 index 0000000..1d9079d --- /dev/null +++ b/test/helpers/alerts_helper_test.rb @@ -0,0 +1,4 @@ +require 'test_helper' + +class AlertsHelperTest < ActionView::TestCase +end diff --git a/test/helpers/main_helper_test.rb b/test/helpers/main_helper_test.rb new file mode 100644 index 0000000..22da3c4 --- /dev/null +++ b/test/helpers/main_helper_test.rb @@ -0,0 +1,4 @@ +require 'test_helper' + +class MainHelperTest < ActionView::TestCase +end diff --git a/test/helpers/pms_helper_test.rb b/test/helpers/pms_helper_test.rb new file mode 100644 index 0000000..af80f10 --- /dev/null +++ b/test/helpers/pms_helper_test.rb @@ -0,0 +1,4 @@ +require 'test_helper' + +class PmsHelperTest < ActionView::TestCase +end diff --git a/test/helpers/search_helper_test.rb b/test/helpers/search_helper_test.rb new file mode 100644 index 0000000..3034163 --- /dev/null +++ b/test/helpers/search_helper_test.rb @@ -0,0 +1,4 @@ +require 'test_helper' + +class SearchHelperTest < ActionView::TestCase +end diff --git a/test/models/alert_test.rb b/test/models/alert_test.rb new file mode 100644 index 0000000..b59c65e --- /dev/null +++ b/test/models/alert_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class AlertTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/pm_test.rb b/test/models/pm_test.rb new file mode 100644 index 0000000..e7f6b8f --- /dev/null +++ b/test/models/pm_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class PmTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/server_settings_test.rb b/test/models/server_settings_test.rb new file mode 100644 index 0000000..470b316 --- /dev/null +++ b/test/models/server_settings_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class ServerSettingsTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/team_match_pair_test.rb b/test/models/team_match_pair_test.rb new file mode 100644 index 0000000..c250b3c --- /dev/null +++ b/test/models/team_match_pair_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class TeamMatchPairTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/user_team_pair_test.rb b/test/models/user_team_pair_test.rb new file mode 100644 index 0000000..55f5c58 --- /dev/null +++ b/test/models/user_team_pair_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class UserTeamPairTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end -- cgit v1.1-4-g5e80
NamePw hashGroups
<%= user.name %><%= user.pw_hash %><%= user.groups %> <%= link_to 'Show', user %> <%= link_to 'Edit', edit_user_path(user) %> <%= link_to 'Destroy', user, method: :delete, data: { confirm: 'Are you sure?' } %>