app/controllers/application_controller.rb
# hook to make sure user logins to private group always
hook to make sure user logins to private group always
hook to make sure user logins to private group always
def after_sign_in_path_for(resource)
    if resource.is_a?(User)
      resource.current_group = resource.find_personal_group
      resource.save
    end
    super
  end
def after_sign_in_path_for ( resource ) if resource . is_a? ( User ) resource . current_group = resource . find_personal_group resource . save end super end
hook to make sure user logins to private group always
hook to make sure user logins to private group always
resource