locomotive_cms 0.0.1.2 → 0.0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/config/initializers/devise.rb +27 -0
- metadata +2 -2
@@ -1,5 +1,32 @@
|
|
1
1
|
require 'devise'
|
2
2
|
|
3
|
+
## patches ##
|
4
|
+
|
5
|
+
module Devise
|
6
|
+
module Models
|
7
|
+
class << self
|
8
|
+
def hook(base)
|
9
|
+
if base.is_a?(Module)
|
10
|
+
base.class_eval do
|
11
|
+
attr_accessor :devise_modules
|
12
|
+
def devise_modules
|
13
|
+
@devise_modules ||= []
|
14
|
+
end
|
15
|
+
end
|
16
|
+
else
|
17
|
+
base.class_eval do
|
18
|
+
class_attribute :devise_modules, :instance_writer => false
|
19
|
+
self.devise_modules ||= []
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
alias :included :hook
|
24
|
+
alias :extended :hook
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
|
3
30
|
# Use this hook to configure devise mailer, warden hooks and so forth. The first
|
4
31
|
# four configuration values can also be set straight in your models.
|
5
32
|
Devise.setup do |config|
|