app/controllers/application_controller.rb
# logs in user and redirects based on type of user
logs in user and redirects based on type of user
logs in user and redirects based on type of user
def log_in(user, message)
    session[:user_id] = user.id
    session[:user_type] = user.class.name
    return redirect_to dance_studio_path(user), success: message if owner?
    redirect_to dancer_path(user), success: message if dancer?
  end
def log_in ( user , message ) session [ :user_id ] = user . id session [ :user_type ] = user . class . name return redirect_to dance_studio_path ( user ) , success : message if owner? redirect_to dancer_path ( user ) , success : message if dancer? end
logs in user and redirects based on type of user
logs in user and redirects based on type of user
user
<not_specific>
message
<not_specific>