Sha256: 021831dff8c1871c5019cd25cb89a74d36430723a7f27c2dac96d83c08e8f6da
Contents?: true
Size: 592 Bytes
Versions: 23
Compression:
Stored size: 592 Bytes
Contents
# Create followers from resource authors Run the following script to make all resource authors follow the resource: ```ruby Decidim.feature_manifests.each do |feature_manifest| feature_manifest.resource_manifests.each do |resource_manifest| klass = resource_manifest.model_class_name.constantize next unless klass.included_modules.include? Decidim::Authorable klass.includes(:author).find_each do |resource| begin Decidim::Follow.create!(followable: resource, user: resource.author) if resource.author.present? rescue end end end end; p 1 ```
Version data entries
23 entries across 23 versions & 1 rubygems