Method import
has 36 lines of code (exceeds 25 allowed). Consider refactoring.
def import
response = request_suap_api({url: 'https://suap.ifpb.edu.br/edu/api/receber_cursos/',
data: course_params})
if response['erro'].nil?
Method import
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
def import
response = request_suap_api({url: 'https://suap.ifpb.edu.br/edu/api/receber_cursos/',
data: course_params})
if response['erro'].nil?
Method exist_other_with_this_name
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
def exist_other_with_this_name
@schoolrooms = Schoolroom.all
unless name.nil?
@schoolrooms.each { |s|
unless s.id == id
Method exist_other_with_this_name
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
def exist_other_with_this_name
@laboratories = Laboratory.all
unless name.nil?
@laboratories.each { |l|
unless l.id == id
Method exist_other_with_this_initials
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
def exist_other_with_this_initials
@laboratories = Laboratory.all
unless initials.nil?
@laboratories.each { |l|
unless l.id == id
Method exist_other_with_this_initials
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
def exist_other_with_this_initials
@schoolrooms = Schoolroom.all
unless initials.nil?
@schoolrooms.each { |s|
unless s.id == id