app/controllers/application_controller.rb
# logged in users will be redirected to terms agreement if they have not yet accepted.
logged in users will be redirected to terms agreement if they have not yet accepted.
logged in users will be redirected to terms agreement if they have not yet accepted .
def check_user_agreed_with_terms
    if logged_in? && ! current_user.agreed_with_terms
      store_location
      redirect_to terms_agreement_user_path(current_user)
    end
  end
def check_user_agreed_with_terms if logged_in? && ! current_user . agreed_with_terms store_location redirect_to terms_agreement_user_path ( current_user ) end end
logged in users will be redirected to terms agreement if they have not yet accepted.
logged in users will be redirected to terms agreement if they have not yet accepted .