Skip to content

Commit

Permalink
Creates all s.
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusbsilva committed Jun 20, 2017
1 parent 88663f8 commit 169498a
Show file tree
Hide file tree
Showing 61 changed files with 190 additions and 6,695 deletions.
8 changes: 2 additions & 6 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ git_source(:github) do |repo_name|
"https://github.com/#{repo_name}.git"
end

gem 'rubocop' , require: false
gem 'rails', '~> 5.0.1'

gem 'puma', '~> 3.0'
Expand Down Expand Up @@ -37,15 +36,12 @@ gem 'mini_magick', '~> 4.3'

gem "paperclip-dropbox", ">= 1.1.7"

gem 'rails-i18n', '~> 5.0.0'
gem 'rails-i18n', '~> 5.0.0'

gem "paperclip", "~> 3.0"

gem 'responders'
gem 'active_model_serializers'

group :development, :test do

gem 'sqlite3'
gem 'rails-controller-testing'
gem 'rspec-rails', '>= 3.5.0'
Expand Down
32 changes: 1 addition & 31 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ GEM
erubis (~> 2.7.0)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
active_model_serializers (0.10.6)
actionpack (>= 4.1, < 6)
activemodel (>= 4.1, < 6)
case_transform (>= 0.2)
jsonapi-renderer (>= 0.1.1.beta1, < 0.2)
activejob (5.0.3)
activesupport (= 5.0.3)
globalid (>= 0.3.6)
Expand All @@ -48,7 +43,6 @@ GEM
archive-zip (0.7.0)
io-like (~> 0.3.0)
arel (7.1.4)
ast (2.3.0)
autoprefixer-rails (7.1.1)
execjs
bcrypt (3.1.11)
Expand All @@ -72,8 +66,6 @@ GEM
activesupport (>= 3.2.0)
json (>= 1.7)
mime-types (>= 1.16)
case_transform (0.2)
activesupport
childprocess (0.7.0)
ffi (~> 1.0, >= 1.0.11)
chromedriver-helper (1.1.0)
Expand Down Expand Up @@ -137,7 +129,6 @@ GEM
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (2.1.0)
jsonapi-renderer (0.1.2)
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
Expand Down Expand Up @@ -165,11 +156,7 @@ GEM
paperclip-dropbox (1.3.2)
dropbox-sdk (~> 1.3)
paperclip (>= 3.1, < 5)
parallel (1.11.2)
parser (2.4.0.0)
ast (~> 2.2)
pg (0.18.4)
powerpack (0.1.1)
public_suffix (2.0.5)
puma (3.9.1)
rack (2.0.3)
Expand Down Expand Up @@ -205,15 +192,10 @@ GEM
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rainbow (2.2.2)
rake
rake (12.0.0)
rb-fsevent (0.9.8)
rb-inotify (0.9.8)
ffi (>= 0.5.0)
responders (2.4.0)
actionpack (>= 4.2.0, < 5.3)
railties (>= 4.2.0, < 5.3)
rspec-core (3.6.0)
rspec-support (~> 3.6.0)
rspec-expectations (3.6.0)
Expand All @@ -231,14 +213,6 @@ GEM
rspec-mocks (~> 3.6.0)
rspec-support (~> 3.6.0)
rspec-support (3.6.0)
rubocop (0.49.1)
parallel (~> 1.10)
parser (>= 2.3.3.1, < 3.0)
powerpack (~> 0.1)
rainbow (>= 1.99.1, < 3.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)
ruby-progressbar (1.8.1)
rubyzip (1.2.1)
sass (3.4.24)
sass-rails (5.0.6)
Expand Down Expand Up @@ -284,7 +258,6 @@ GEM
thread_safe (~> 0.1)
uglifier (3.2.0)
execjs (>= 0.3.0, < 3)
unicode-display_width (1.2.1)
validates_cpf_cnpj (0.2.0)
activemodel (>= 3.0.0)
web-console (3.5.1)
Expand All @@ -303,7 +276,6 @@ PLATFORMS
ruby

DEPENDENCIES
active_model_serializers
bcrypt (~> 3.1.7)
bootstrap-sass (~> 3.3, >= 3.3.6)
bootswatch-rails
Expand All @@ -327,9 +299,7 @@ DEPENDENCIES
rails (~> 5.0.1)
rails-controller-testing
rails-i18n (~> 5.0.0)
responders
rspec-rails (>= 3.5.0)
rubocop
sass-rails (~> 5.0)
selenium-webdriver (~> 2.53)
simplecov
Expand All @@ -344,4 +314,4 @@ DEPENDENCIES
web-console (>= 3.3.0)

BUNDLED WITH
1.15.1
1.14.6
6 changes: 0 additions & 6 deletions app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,7 @@ body {
.btn-roxo{
background-color: #9768D1;
color: white;
}

.txt-branko{
color: white;
padding-top: 19.5px;
padding-bottom: 19.5px;
padding-left: 10px;
}

.btn-strike{
Expand Down
6 changes: 0 additions & 6 deletions app/assets/stylesheets/master.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@
padding: 0;
}

.navbar-header a{
overflow: auto;
display: inline-block;
padding-top: 3.5px;
}

.navbar-header button{
color: white;
border: solid 3px white;
Expand Down
20 changes: 9 additions & 11 deletions app/controllers/alumns_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def index
@alumns = Alumn.all.order('created_at DESC')
end
else
redirect_to "/errors/error_500"
redirect_to "/errors/error_500"
end
end

Expand All @@ -32,7 +32,7 @@ def show
@alumn = Alumn.find(id)
Alumn.current = @alumn
else
redirect_to "/errors/error_500"
redirect_to "/errors/error_500"
end
end

Expand All @@ -42,7 +42,7 @@ def new
@@parent = Parent.find(params[:parent_id])
@classrooms = Classroom.all.order('name_classroom')
else
redirect_to "/errors/error_500"
redirect_to "/errors/error_500"
end
end

Expand All @@ -51,7 +51,7 @@ def edit
@alumn = Alumn.find(params[:id])
@classrooms = Classroom.all.order('name_classroom')
else
redirect_to "/errors/error_500"
redirect_to "/errors/error_500"
end
end

Expand All @@ -68,7 +68,7 @@ def create
render 'new'
end
else
redirect_to "/errors/error_500"
redirect_to "/errors/error_500"
end
end

Expand All @@ -84,7 +84,7 @@ def update
render 'edit'
end
else
redirect_to "/errors/error_500"
redirect_to "/errors/error_500"
end
end

Expand All @@ -102,7 +102,7 @@ def edit_password_alumn
@user = Alumn.find(params[:id])
render action: "../users/edit_password"
else
redirect_to "/errors/error_500"
redirect_to "/errors/error_500"
end
end

Expand All @@ -115,7 +115,7 @@ def update_password_alumn
render action: "../users/edit_password"
end
else
redirect_to "/errors/error_500"
redirect_to "/errors/error_500"
end
end

Expand All @@ -138,8 +138,6 @@ def alumn_params
:birth_date,
:password,
:parent_id,
:classroom_id,
:photo,
:bar_code)
:classroom_id)
end
end
11 changes: 0 additions & 11 deletions app/controllers/api/alumns_controller.rb

This file was deleted.

11 changes: 0 additions & 11 deletions app/controllers/api/notifications_controller.rb

This file was deleted.

11 changes: 0 additions & 11 deletions app/controllers/api/parents_controller.rb

This file was deleted.

11 changes: 0 additions & 11 deletions app/controllers/api/strikes_controller.rb

This file was deleted.

11 changes: 0 additions & 11 deletions app/controllers/api/suspensions_controller.rb

This file was deleted.

19 changes: 1 addition & 18 deletions app/controllers/classrooms_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ class ClassroomsController < ApplicationController
def index
if ( is_principal? or is_secretary? )
@classrooms = Classroom.all.order('name_classroom')
unless params[:classroom_grades_id].blank?
@classrooms &= Classroom.where(classroom_grades_id: params[:classroom_grades_id])
end
unless params[:shifts_id].blank?
@classrooms &= Classroom.where(shifts_id: params[:shifts_id])
end
else
redirect_to "/errors/error_500"
end
Expand All @@ -21,8 +15,6 @@ def index
def new
if ( is_principal? )
@classroom = Classroom.new
@classroom_grades = ClassroomGrade.all
@shifts = Shift.all
else
redirect_to "/errors/error_500"
end
Expand All @@ -31,8 +23,6 @@ def new
def show
if ( is_principal? or is_secretary?)
@classroom = Classroom.find(params[:id])
@shift = Shift.find_by_id(@classroom.shifts_id)
@classroom_grade = ClassroomGrade.find_by_id(@classroom.classroom_grades_id)
else
redirect_to "/errors/error_500"
end
Expand All @@ -41,8 +31,6 @@ def show
def create
if ( is_principal? )
@classroom = Classroom.create(classroom_params)
@classroom_grades = ClassroomGrade.all
@shifts = Shift.all
if ( @classroom.save )
flash[:success] = "Turma criada com sucesso"
redirect_to classroom_path(@classroom)
Expand All @@ -68,8 +56,6 @@ def destroy
def edit
if ( is_principal? )
@classroom = Classroom.find(params[:id])
@classroom_grades = ClassroomGrade.all
@shifts = Shift.all
else
redirect_to "/errors/error_500"
end
Expand All @@ -78,8 +64,6 @@ def edit
def update
if ( is_principal? )
@classroom = Classroom.find(params[:id])
@classroom_grades = ClassroomGrade.all
@shifts = Shift.all
if @classroom.update(classroom_params)
redirect_to classroom_path(@classroom)
else
Expand Down Expand Up @@ -123,7 +107,6 @@ def add_alumn
private
def classroom_params
params.require(:classroom).permit(:name_classroom,
:shifts_id,
:classroom_grades_id)
:shift_classroom)
end
end
Loading

0 comments on commit 169498a

Please sign in to comment.