Merge pull request #44 from discoursehosting/master
Add email_messages_level and email_digests as updatable user fields
Dieser Commit ist enthalten in:
Commit
f0edc18804
2 geänderte Dateien mit 18 neuen und 4 gelöschten Zeilen
|
@ -47,7 +47,9 @@ const userProperties = [
|
||||||
'website',
|
'website',
|
||||||
'bio_raw',
|
'bio_raw',
|
||||||
'trust_level',
|
'trust_level',
|
||||||
'email_level'
|
'email_level',
|
||||||
|
'email_messages_level',
|
||||||
|
'email_digests'
|
||||||
];
|
];
|
||||||
|
|
||||||
const notificationLevels = [
|
const notificationLevels = [
|
||||||
|
@ -117,4 +119,4 @@ export {
|
||||||
listProperties,
|
listProperties,
|
||||||
notificationLevels,
|
notificationLevels,
|
||||||
wizardFieldList
|
wizardFieldList
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,7 +1,19 @@
|
||||||
class CustomWizard::Mapper
|
class CustomWizard::Mapper
|
||||||
attr_accessor :inputs, :data, :user
|
attr_accessor :inputs, :data, :user
|
||||||
|
|
||||||
USER_FIELDS = ['name', 'username', 'email', 'date_of_birth', 'title', 'locale', 'trust_level', 'email_level']
|
USER_FIELDS = [
|
||||||
|
'name',
|
||||||
|
'username',
|
||||||
|
'email',
|
||||||
|
'date_of_birth',
|
||||||
|
'title',
|
||||||
|
'locale',
|
||||||
|
'trust_level',
|
||||||
|
'email_level',
|
||||||
|
'email_messages_level',
|
||||||
|
'email_digests'
|
||||||
|
]
|
||||||
|
|
||||||
PROFILE_FIELDS = ['location', 'website', 'bio_raw']
|
PROFILE_FIELDS = ['location', 'website', 'bio_raw']
|
||||||
|
|
||||||
def self.user_fields
|
def self.user_fields
|
||||||
|
@ -237,4 +249,4 @@ class CustomWizard::Mapper
|
||||||
result = data[k]
|
result = data[k]
|
||||||
keys.empty? ? result : self.recurse(result, keys)
|
keys.empty? ? result : self.recurse(result, keys)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Laden …
In neuem Issue referenzieren