Sha256: 9d8c4283bbb4d26616b007f0ac9dea6505f2fd4c5655804e0f2ecf810f8bc9c7
Contents?: true
Size: 776 Bytes
Versions: 17
Compression:
Stored size: 776 Bytes
Contents
class InvitationsController < ApplicationController before_action :set_invitation! def show redirect_to_organization! if current_user.student_of? @organization end def join current_user.make_student_of! @invitation.course current_user.update! user_params current_user.notify! redirect_to_organization! end def authorize_if_private! # This controller must never be authenticated end private def redirect_to_organization! redirect_to Mumukit::Platform.laboratory.organic_url @organization end def user_params params.require(:user).permit(:name, :first_name, :last_name, :email) end def set_invitation! @invitation = Invitation.find_by_code params[:code] @organization = @invitation.organization end end
Version data entries
17 entries across 17 versions & 1 rubygems