mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Do not include method definitions in serializer attributes
These accidental inclusions are mostly no-ops (because the method name is also included as an explicit symbol). The mistakes were made more obvious because syntax_tree adjusted the indentation of these methods
This commit is contained in:
@@ -67,16 +67,15 @@ class UserSerializer < UserCardSerializer
|
||||
:sidebar_list_destination,
|
||||
:display_sidebar_tags
|
||||
|
||||
untrusted_attributes :bio_raw,
|
||||
:bio_cooked,
|
||||
:profile_background_upload_url,
|
||||
###
|
||||
### ATTRIBUTES
|
||||
###
|
||||
#
|
||||
def user_notification_schedule
|
||||
object.user_notification_schedule || UserNotificationSchedule::DEFAULT
|
||||
end
|
||||
untrusted_attributes :bio_raw, :bio_cooked, :profile_background_upload_url
|
||||
|
||||
###
|
||||
### ATTRIBUTES
|
||||
###
|
||||
#
|
||||
def user_notification_schedule
|
||||
object.user_notification_schedule || UserNotificationSchedule::DEFAULT
|
||||
end
|
||||
|
||||
def mailing_list_posts_per_day
|
||||
val = Post.estimate_posts_per_day
|
||||
|
||||
Reference in New Issue
Block a user