Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Changes for Rails 3.2 and Clearance 0.16 #1
I took the liberty to make some changes to get this much appreciated middleware to work with Rails 3.2 and the newest clearance gem. I removed the current_user override, as it is no longer necessary and made the middleware use clearance_session.sign_in instead of manipulating env directly. Also, the targeting_api? call will take any HTTP Accept-header into consideration, so unauthorized API calls made with just this header will still return 401 instead of redirecting to a sign in page.
I've also taken the liberty to update the FactoryGirl syntax used in tests and made sure the tests pass again.
If you're satisfied with the changes, feel free to pull them in.