Changes for Rails 3.2 and Clearance 0.16 #1

Open
wants to merge 5 commits into
from

Conversation

Projects
None yet
4 participants
@jgarth

jgarth commented Jun 6, 2012

Hey karmi,

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.

@jwarchol

This comment has been minimized.

Show comment
Hide comment
@jwarchol

jwarchol Jul 12, 2012

Really hoping this pull gets accepted soon 👍

Really hoping this pull gets accepted soon 👍

@jhny

This comment has been minimized.

Show comment
Hide comment
@jhny

jhny Mar 11, 2013

@jgarth Is this code still relevant for the 1.0.0-rc version of clearance?

jhny commented Mar 11, 2013

@jgarth Is this code still relevant for the 1.0.0-rc version of clearance?

@steverob steverob referenced this pull request Jul 13, 2016

Open

signed_in? returns false #2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment