fga-gpp-mds/2017.1-Escola-X

View on GitHub

Showing 3,213 of 3,213 total issues

SchoolMissesController assumes too much for instance variable '@school_miss'
Open

class SchoolMissesController < ApplicationController

SecretariesController#index calls 'Secretary.all.order('created_at DESC')' 2 times
Open

@secretaries = Secretary.all.order('created_at DESC')
flash.now[:feedback_warning] = "Digite algo para pesquisar!"
end
else
@secretaries = Secretary.all.order('created_at DESC')

StrikesController assumes too much for instance variable '@alumn'
Open

class StrikesController < ApplicationController
Severity: Minor
Found in app/controllers/strikes_controller.rb by reek

SubjectsController assumes too much for instance variable '@subject'
Open

class SubjectsController < ApplicationController
Severity: Minor
Found in app/controllers/subjects_controller.rb by reek

AlumnsController#index calls 'Alumn.all.order('created_at DESC')' 2 times
Open

@alumns = Alumn.all.order('created_at DESC')
flash.now[:feedback_warning] = "Digite algo para pesquisar!"
end
else
@alumns = Alumn.all.order('created_at DESC')
Severity: Minor
Found in app/controllers/alumns_controller.rb by reek

AlumnsController#index calls 'params[:search]' 3 times
Open

if params[:search]
string_to_search = params[:search]
@alumns = Alumn.search(string_to_search.strip.upcase!).order("created_at DESC")
if (@alumns.empty?)
flash.now[:feedback] = "Nenhum(a) aluno(a) encontrado!"
Severity: Minor
Found in app/controllers/alumns_controller.rb by reek

ReaderController has no descriptive comment
Open

class ReaderController < ApplicationController
Severity: Minor
Found in app/controllers/reader_controller.rb by reek

SessionsController assumes too much for instance variable '@user'
Open

class SessionsController < ApplicationController
Severity: Minor
Found in app/controllers/sessions_controller.rb by reek

StrikesController declares the class variable '@@alumn'
Open

@@alumn = Alumn.find(id)
@strikes = @@alumn.strikes
else
redirect_to "/errors/error_500"
end
Severity: Minor
Found in app/controllers/strikes_controller.rb by reek

SubjectsController#add_classroom calls '@subject.id' 2 times
Open

if !((ClassroomSubject.where(classroom_id: @classroom.id).where(subject_id: @subject.id)).exists?)
@classroom_subject = ClassroomSubject.new
@classroom_subject.subject_id = @subject.id
Severity: Minor
Found in app/controllers/subjects_controller.rb by reek

SubjectsController#create calls 'render 'new'' 2 times
Open

render 'new'
else
@subject.teacher_id = @teacher.id
if ( @subject.save )
flash[:success] = "Matéria criada com sucesso"
Severity: Minor
Found in app/controllers/subjects_controller.rb by reek

SubjectsController#update calls '@subject.update(subject_params)' 2 times
Open

@subject.update(subject_params)
render 'edit'
else
@subject.teacher_id = @teacher.id
if ( @subject.update(subject_params) )
Severity: Minor
Found in app/controllers/subjects_controller.rb by reek

GradeHistoriesController has no descriptive comment
Open

class GradeHistoriesController < ApplicationController

SchoolMissesController has no descriptive comment
Open

class SchoolMissesController < ApplicationController

SubjectsController#add_classroom calls 'redirect_to add_classrooms_path(@classroom)' 2 times
Open

redirect_to add_classrooms_path(@classroom)
end
else
flash[:alert] = "Matéria não pode ser adicionada ou já existe na turma"
redirect_to add_classrooms_path(@classroom)
Severity: Minor
Found in app/controllers/subjects_controller.rb by reek

EmployeesController assumes too much for instance variable '@user'
Open

class EmployeesController < UsersController

SecretariesController#index calls 'flash.now' 2 times
Open

flash.now[:feedback] = "Nenhum secretário(a) encontrado!"
end
if params[:search].blank?
@secretaries = Secretary.all.order('created_at DESC')
flash.now[:feedback_warning] = "Digite algo para pesquisar!"

NotificationsController assumes too much for instance variable '@notification'
Open

class NotificationsController < ApplicationController

SecretariesController assumes too much for instance variable '@secretaries'
Open

class SecretariesController < ApplicationController

SuspensionsController assumes too much for instance variable '@current_user'
Open

class SuspensionsController < ApplicationController
Severity
Category
Status
Source
Language