Skip to content

Commit

Permalink
DEV: Pass respect_plugin_enabled to add_to_serializer as keyword argu…
Browse files Browse the repository at this point in the history
…ment (#172)

Passing the respect_plugin_enabled argument to #add_to_serializer as a positional argument is deprecated. It is now expected to be a keyword argument. This PR adds the keyword.
  • Loading branch information
Drenmi committed Oct 30, 2023
1 parent b8f3453 commit c7918e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class Engine < ::Rails::Engine
end
end

add_to_serializer(:category, :custom_fields, false) do
add_to_serializer(:category, :custom_fields, respect_plugin_enabled: false) do
return object.custom_fields if !SiteSetting.voting_enabled

object.custom_fields.merge(
Expand Down

0 comments on commit c7918e8

Please sign in to comment.