Devise config settings per customer

46 views
Skip to first unread message

mat...@venuenext.com

unread,
Mar 10, 2016, 1:19:04 PM3/10/16
to Devise
Hello,

I was wondering if anyone had any experience to set password length restrictions, maximum failed attempts and other options on a per customer basis within the same app.

since these settings are set as a initializer at app boot time, I think this would involve, writing a new module that would make some of those more dynamic.

anything that is doing that already exist?

any suggestions, comments welcome

cheers,

Daniel Wiesmann

unread,
Jan 23, 2017, 4:07:42 AM1/23/17
to Devise
I've been trying to do exactly that also.
I think that since each Model gets its configuration from self.class.some_setting, one way to do that would be to either monkeypatch those calls or to inherit&override that behavior.
What did you end up doing?

Daniel

Mathieu Jobin

unread,
Jan 23, 2017, 9:01:28 AM1/23/17
to plataforma...@googlegroups.com
we postponed that feature. but it sounds like extending the gem will be required indeed.

I would probably make all config go through a method of my own with the rules I need


--

---
You received this message because you are subscribed to a topic in the Google Groups "Devise" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/plataformatec-devise/lW-FPh9eYbQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to plataformatec-devise+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Thanks, 
Mathieu Jobin
VENUENEXT


GPG: 992949FB
See how we are transforming live events, at venuenext.com
Connect with us on Facebook  Twitter  LinkedIn

Daniel Wiesmann

unread,
Jan 23, 2017, 9:16:12 AM1/23/17
to Devise
Reply all
Reply to author
Forward
0 new messages