FIX: wraps overrides in reloadable_patch
This commit is contained in:
parent
335b613e52
commit
020ed3cd6d
|
@ -36,6 +36,7 @@ after_initialize do
|
|||
|
||||
load File.expand_path('../app/jobs/onceoff/voting_ensure_consistency.rb', __FILE__)
|
||||
|
||||
reloadable_patch do |plugin|
|
||||
require_dependency 'basic_category_serializer'
|
||||
class ::BasicCategorySerializer
|
||||
attributes :can_vote
|
||||
|
@ -47,7 +48,6 @@ after_initialize do
|
|||
def can_vote
|
||||
true
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
require_dependency 'post_serializer'
|
||||
|
@ -82,7 +82,7 @@ after_initialize do
|
|||
false
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
add_to_serializer(:topic_list_item, :vote_count) { object.vote_count }
|
||||
|
|
Loading…
Reference in New Issue