application_controller.rb 247 Bytes
Newer Older
Eugen Rochko's avatar
Eugen Rochko committed
1 2
# frozen_string_literal: true

Eugen Rochko's avatar
Eugen Rochko committed
3 4
class ApplicationController < ActionController::Base
  protect_from_forgery with: :exception
Eugen Rochko's avatar
Eugen Rochko committed
5 6

  def after_sign_in_path_for(user)
Eugen Rochko's avatar
Eugen Rochko committed
7
    if user.twitter.nil?
Eugen Rochko's avatar
Eugen Rochko committed
8 9 10 11 12
      root_path
    else
      friends_path
    end
  end
Eugen Rochko's avatar
Eugen Rochko committed
13
end