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__)
|
load File.expand_path('../app/jobs/onceoff/voting_ensure_consistency.rb', __FILE__)
|
||||||
|
|
||||||
|
reloadable_patch do |plugin|
|
||||||
require_dependency 'basic_category_serializer'
|
require_dependency 'basic_category_serializer'
|
||||||
class ::BasicCategorySerializer
|
class ::BasicCategorySerializer
|
||||||
attributes :can_vote
|
attributes :can_vote
|
||||||
|
@ -47,7 +48,6 @@ after_initialize do
|
||||||
def can_vote
|
def can_vote
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
require_dependency 'post_serializer'
|
require_dependency 'post_serializer'
|
||||||
|
@ -82,7 +82,7 @@ after_initialize do
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
add_to_serializer(:topic_list_item, :vote_count) { object.vote_count }
|
add_to_serializer(:topic_list_item, :vote_count) { object.vote_count }
|
||||||
|
|
Loading…
Reference in New Issue