Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes for Rails 3.2 and Clearance 0.16 #1

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

jgarth
Copy link

@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
Copy link

Really hoping this pull gets accepted soon 👍

@jhny
Copy link

jhny commented Mar 11, 2013

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants