Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Patricio Sanchez
/
quiniela-mundial
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Iker Narvaez
2018-06-08 17:17:33 -0500
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
481ec7cc5a09cc5d5daa8d5b228281a899b5241c
481ec7cc
1 parent
7854a307
rename tables
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
3 deletions
app/controllers/admin/pools_controller.rb
app/models/pool.rb
config/routes.rb
db/migrate/20180608215706_create_project.rb
app/controllers/admin/pools_controller.rb
0 → 100644
View file @
481ec7c
class
PoolsController
<
CrudController
::
Base
enable_gatekeeper
guard_bifrost
end
app/models/pool.rb
0 → 100644
View file @
481ec7c
# frozen_string_literal: true
# == Schema Information
#
# Table name: heimdall_engine_roles
#
# id :integer not null, primary key
# name :string
# created_at :datetime
# updated_at :datetime
# deleted_at :datetime
# erasable :boolean
#
class
Pool
<
ApplicationRecord
validates
:name
,
:editable_unitl
,
presence:
true
has_many
:matches
,
dependent: :destroy
,
inverse_of: :pool
accepts_nested_attributes_for
:matches
,
reject_if: :all_blank
,
allow_destroy:
true
end
config/routes.rb
View file @
481ec7c
...
...
@@ -2,4 +2,6 @@ Rails.application.routes.draw do
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
HeimdallEngine
.
load_routes
root
'application#root'
resources
:pools
end
...
...
db/migrate/20180608215706_create_project.rb
View file @
481ec7c
class
CreateProject
<
ActiveRecord
::
Migration
[
5
.
0
]
def
change
create_table
:match
do
|
t
|
create_table
:match
es
do
|
t
|
t
.
string
:local
,
null:
false
t
.
string
:visit
,
null:
false
t
.
date
:date
,
null:
false
...
...
@@ -10,13 +10,13 @@ class CreateProject < ActiveRecord::Migration[5.0]
t
.
integer
:pool_id
,
null:
false
end
create_table
:pool
do
|
t
|
create_table
:pool
s
do
|
t
|
t
.
string
:name
,
null:
false
t
.
datetime
:editable_until
,
null:
false
t
.
boolean
:active
end
create_table
:bet
do
|
t
|
create_table
:bet
s
do
|
t
|
t
.
integer
:match_id
,
null:
false
t
.
integer
:user_id
,
null:
false
t
.
integer
:score_local
,
null:
false
...
...
Please
register
or
login
to post a comment