Class: Decidim::DecidimAwesome::PrivateDataFinder
- Inherits:
-
Object
- Object
- Decidim::DecidimAwesome::PrivateDataFinder
- Defined in:
- app/queries/decidim/decidim_awesome/private_data_finder.rb
Instance Method Summary collapse
Instance Method Details
#for(resources) ⇒ Object
14 15 16 |
# File 'app/queries/decidim/decidim_awesome/private_data_finder.rb', line 14 def for(resources) Component.where(id: proposals).where(id: resources) end |
#proposals ⇒ Object
10 11 12 |
# File 'app/queries/decidim/decidim_awesome/private_data_finder.rb', line 10 def proposals Decidim::Proposals::Proposal.select(:decidim_component_id).joins(:extra_fields) end |
#query ⇒ Object
6 7 8 |
# File 'app/queries/decidim/decidim_awesome/private_data_finder.rb', line 6 def query Component.where(id: proposals.where.not(extra_fields: { private_body: nil })) end |