diff --git a/plugin.rb b/plugin.rb index d353768..4e67504 100644 --- a/plugin.rb +++ b/plugin.rb @@ -115,6 +115,21 @@ after_initialize do end end + [ + 'donations_cause', + 'donations_total', + 'donations_month', + 'donations_backers', + 'donations_show_amounts', + 'donations_maintainers', + 'donations_maintainers_label', + 'donations_github', + 'donations_meta' + ].each do |key| + Site.preloaded_category_custom_fields << key if Site.respond_to? :preloaded_category_custom_fields + end + + add_to_serializer(:basic_category, :donations_cause) { object.donations_cause } add_to_serializer(:basic_category, :donations_total) { object.donations_total } add_to_serializer(:basic_category, :include_donations_total?) { object.donations_show_amounts }