app/controllers/application_controller.rb
def login_nav_buttons
    url = request.fullpath

    case url
    when root_path
      @buttons = [4, 5]
    when new_user_session_path
      @buttons = [4]
    when new_user_registration_path
      @buttons = [5]
    else
      @buttons = [1, 2, 3]
    end
  end
# 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.
Prevent CSRF attacks by raising an exception . For APIs you may want to use : null_session instead .
def login_nav_buttons
    url = request.fullpath
    case url
    when root_path
      @buttons = [4, 5]
    when new_user_session_path
      @buttons = [4]
    when new_user_registration_path
      @buttons = [5]
    else
      @buttons = [1, 2, 3]
    end
  end
def login_nav_buttons url = request . fullpath case url when root_path @buttons = [ 4 , 5 ] when new_user_session_path @buttons = [ 4 ] when new_user_registration_path @buttons = [ 5 ] else @buttons = [ 1 , 2 , 3 ] end end
Prevent CSRF attacks by raising an exception.
Prevent CSRF attacks by raising an exception .