app/controllers/application_controller.rb
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
# protect_from_forgery with: :null_session
Prevent CSRF attacks by raising an exception.
For APIs, you may want to use :null_session instead.
Prevent CSRF attacks by raising an exception . For APIs you may want to use : null_session instead .
def authenticate_parent!
    if current_user
      if current_user.role.title == "child"
        redirect_to "/child_dashboard"
      end
    end
  end
def authenticate_parent! if current_user if current_user . role . title == "child" redirect_to "/child_dashboard" end end end
Prevent CSRF attacks by raising an exception.
Prevent CSRF attacks by raising an exception .