Quantcast
Channel: WhizCreed
Viewing all articles
Browse latest Browse all 14

How to find if already logged in via HTTP Basic Authentication in Rails 3

$
0
0

It might sound too obvious but I failed to find any examples on usual guides or any help via stackoverflow :(

I looked up the code on api.rubyonrails.org and found that it calls two different methods. After following the train of code, I found that following piece of code will work:


def logged_in?
request.authorization ? true : false
end


Viewing all articles
Browse latest Browse all 14

Trending Articles