Class: Decidim::DummyResources::DummyResource
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Decidim::DummyResources::DummyResource
- Includes:
- Amendable, Authorable, Comments::Commentable, Decidim::DataPortability, Endorsable, HasAttachments, NewsletterParticipant, ShareableWithToken, TranslatableResource, Followable, HasCategory, HasComponent, HasReference, Paddable, Publicable, Reportable, Resourceable, ScopableResource, Searchable, Traceable
- Defined in:
- lib/decidim/dev/test/rspec_support/component.rb
Class Method Summary collapse
- .export_serializer ⇒ Object
- .newsletter_participant_ids(component) ⇒ Object
- .user_collection(user) ⇒ Object
Instance Method Summary collapse
Class Method Details
.export_serializer ⇒ Object
104 105 106 |
# File 'lib/decidim/dev/test/rspec_support/component.rb', line 104 def self.export_serializer DummySerializer end |
.newsletter_participant_ids(component) ⇒ Object
108 109 110 111 112 113 |
# File 'lib/decidim/dev/test/rspec_support/component.rb', line 108 def self.(component) Decidim::DummyResources::DummyResource.where(component: component).joins(:component) .where(decidim_author_type: Decidim::UserBaseEntity.name) .where.not(author: nil) .pluck(:decidim_author_id).flatten.compact.uniq end |
.user_collection(user) ⇒ Object
100 101 102 |
# File 'lib/decidim/dev/test/rspec_support/component.rb', line 100 def self.user_collection(user) where(decidim_author_id: user.id, decidim_author_type: "Decidim::User") end |
Instance Method Details
#allow_resource_permissions? ⇒ Boolean
96 97 98 |
# File 'lib/decidim/dev/test/rspec_support/component.rb', line 96 def component.settings. end |
#reported_content_url ⇒ Object
92 93 94 |
# File 'lib/decidim/dev/test/rspec_support/component.rb', line 92 def reported_content_url ResourceLocatorPresenter.new(self).url end |