← Back to Upcase

Clearance Gem Support Non-User Models


(Noah Clark) #1

We’ve started to go down the road of using Clearance in one of our apps and it’s working pretty well for us, but we’re pretty committed to not calling the logged in people “users” because it breaks the vernacular at our company and we’d like the dev team and the business to share the same language.

If you don’t call your model “users” that you use to login you run into a few small annoyances. Until now, we’ve been able to fix them via some hacks in our rails app. We’d like to extract those hacks and either put them into Thoughtbot’s version of clearance.

With that in mind we issued a pull request here: https://github.com/thoughtbot/clearance/pull/377 that hasn’t been merged in or commented on.

I’d be interested to know what it would take to get this (and subsequent fixes) merged into clearance that would allow us and others to use non-user models as our model that logs in. If that’s not a direction that clearance wants to take that’s cool too as we can host our own version and merge in clearance occasionally, however, our preference would be to get it into Clearance proper if possible.


(Ben Orenstein) #2

Hey Noah,

I’m sorry you didn’t get a response to your pull. We can and should do better.

I just reviewed it and left a comment. Assuming my colleagues don’t object, I’m happy to merge it once the comment is addressed.

-Ben


(Noah Clark) #3

Thanks! Hadn’t seen the around before. Very cool.