Skip to content
Snippets Groups Projects
Commit e95e6006 authored by Israel Barreto Sant'Anna's avatar Israel Barreto Sant'Anna
Browse files

Merge branch 'teacher_info' into 'master'

Added belongs_to school in User

See merge request portalmec/portalmec!499
parents 730b657c 9d2477e6
No related branches found
No related tags found
No related merge requests found
......@@ -70,6 +70,8 @@ class User < ApplicationRecord
include DeviseTokenAuth::Concerns::User
belongs_to :school
has_and_belongs_to_many :roles
has_and_belongs_to_many :institutions
......@@ -293,7 +295,7 @@ class User < ApplicationRecord
return true if (changed & ["teacher_id", "birthday"]).empty?
params = {
filter: "teacher:#{teacher_id},day: #{birthday.day},month:#{birthday.month},year:#{birthday.year},min_year:2017"
filter: "teacher:#{teacher_id},day: #{birthday.day},month:#{birthday.month},year:#{birthday.year},min_year:2017"
}
uri = URI("https://simcaq.c3sl.ufpr.br/api/v1/verify_teacher")
uri.query = URI.encode_www_form(params)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment