Trying to implement an create if not exists else update record in Active Record.
Currently using:
@student = Student.where(:user_id
You may be looking for first_or_create or something similar:
first_or_create
http://guides.rubyonrails.org/v3.2.17/active_record_querying.html#first_or_create