Class: Decidim::Follow
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Decidim::Follow
- Includes:
- DownloadYourData
- Defined in:
- app/models/decidim/follow.rb
Class Method Summary collapse
- .export_serializer ⇒ Object
- .user_collection(user) ⇒ Object
- .user_follower_ids_for_participatory_spaces(spaces) ⇒ Object
Class Method Details
.export_serializer ⇒ Object
22 23 24 |
# File 'app/models/decidim/follow.rb', line 22 def self.export_serializer Decidim::DownloadYourDataSerializers::DownloadYourDataFollowSerializer end |
.user_collection(user) ⇒ Object
18 19 20 |
# File 'app/models/decidim/follow.rb', line 18 def self.user_collection(user) where(decidim_user_id: user.id) end |
.user_follower_ids_for_participatory_spaces(spaces) ⇒ Object
26 27 28 |
# File 'app/models/decidim/follow.rb', line 26 def self.user_follower_ids_for_participatory_spaces(spaces) joins(:user).where(followable: spaces).pluck(:decidim_user_id).uniq end |