decidim-surveys 0.23.6 → 0.24.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 28b93ce6de694fd5c8a9b7a36f76f5e32d7d979addbb8bb3ac18cbf374d3ecff
4
- data.tar.gz: 84d7573c2fcbd6521d37aac90dab6e4cef4801d66a555cc7f41564cb557ef6b0
3
+ metadata.gz: af4b91c9293ed9ea20b5c26d30fb39d737c3ac75c895a3a9f9cfd1de4faee968
4
+ data.tar.gz: dac349c2ca9f62d61bd6bd1032ce0f16d932390611a67468fc8f9fe7e6d123dc
5
5
  SHA512:
6
- metadata.gz: 78136977ea8aa58b7cc947611543686032868a0ff8b7cec5efa96f4cc8aa18fb908c393be6b9954b41eee029b303ace024bfb62f4a38f4c91d1e32be4b03c1f4
7
- data.tar.gz: d517a524054c164a8892c29da4aa306817a2da6495fb470ec730fd9ca20f87a91728370e2440f75bfdb4bcc6e3f696910d5634ad5a3a00379342a8c88c3a6044
6
+ metadata.gz: 8d2ad1ff942b509f64df52d4062e2a03b54625be459e3c2d0106b61f0be3519ff87b161f9efe9c5ab9926b888605bb4f42cc136606957fdb0bb114bf6b36610c
7
+ data.tar.gz: 3b9346b7bcb2de0c6f16d03a66683a1621827e6419c2baeb24e4e1bd987f7bf8abc6bf4ef8291d7b86dc3cff708c44170e7f51a9844929f97e565c9c86d08623
@@ -22,6 +22,10 @@ module Decidim
22
22
  Decidim::EngineRouter.admin_proxy(survey.component).show_survey_path(session_token: session_token)
23
23
  end
24
24
 
25
+ def edit_questionnaire_title
26
+ t(:title, scope: "decidim.forms.admin.questionnaires.form", questionnaire_for: translated_attribute(current_component.name))
27
+ end
28
+
25
29
  private
26
30
 
27
31
  def i18n_flashes_scope
@@ -23,7 +23,7 @@ module Decidim
23
23
  protected
24
24
 
25
25
  def allow_answers?
26
- !current_component.published? || current_settings.allow_answers?
26
+ !current_component.published? || (current_settings.allow_answers? && survey.open?)
27
27
  end
28
28
 
29
29
  def form_path
@@ -15,6 +15,24 @@ module Decidim
15
15
  def clean_after_publish?
16
16
  component.settings.clean_after_publish?
17
17
  end
18
+
19
+ def starts_at
20
+ component.settings.starts_at
21
+ end
22
+
23
+ def ends_at
24
+ component.settings.ends_at
25
+ end
26
+
27
+ def open?
28
+ return true if starts_at.blank? && ends_at.blank?
29
+ return true if ends_at.blank? && starts_at.past?
30
+ return true if starts_at.blank? && ends_at.future?
31
+
32
+ return Time.zone.now.between?(starts_at, ends_at) if starts_at.present? && ends_at.present?
33
+
34
+ false
35
+ end
18
36
  end
19
37
  end
20
38
  end
@@ -25,8 +25,12 @@ cs:
25
25
  global:
26
26
  announcement: Oznámení
27
27
  clean_after_publish: Odstranit odpovědi při publikování ankety
28
+ ends_at: Odpověď přijata do
29
+ ends_at_help: Ponechte prázdné pro žádné konkrétní datum
28
30
  scope_id: Oblast působnosti
29
31
  scopes_enabled: Oblasti působnosti povoleny
32
+ starts_at: Odpovědi přijaté od
33
+ starts_at_help: Ponechte prázdné pro žádné konkrétní datum
30
34
  step:
31
35
  allow_answers: Povolte odpovědi
32
36
  allow_unregistered: Umožnit neregistrovaným uživatelům odpovědět na průzkum
@@ -21,8 +21,12 @@ de:
21
21
  global:
22
22
  announcement: Ankündigung
23
23
  clean_after_publish: Antworten bei Veröffentlichung des Fragebogens löschen
24
+ ends_at: Antworten akzeptiert bis
25
+ ends_at_help: Leer lassen für kein bestimmtes Datum
24
26
  scope_id: Bereich
25
27
  scopes_enabled: Bereiche aktiviert
28
+ starts_at: Antworten akzeptiert von
29
+ starts_at_help: Leer lassen für kein bestimmtes Datum
26
30
  step:
27
31
  allow_answers: Erlaube Antworten
28
32
  allow_unregistered: Nicht registrierten Benutzern die Beantwortung des Fragebogens erlauben
@@ -22,8 +22,12 @@ en:
22
22
  global:
23
23
  announcement: Announcement
24
24
  clean_after_publish: Delete answers when publishing the survey
25
+ ends_at: Answers accepted until
26
+ ends_at_help: Leave blank for no specific date
25
27
  scope_id: Scope
26
28
  scopes_enabled: Scopes enabled
29
+ starts_at: Answers accepted from
30
+ starts_at_help: Leave blank for no specific date
27
31
  step:
28
32
  allow_answers: Allow answers
29
33
  allow_unregistered: Allow unregistered users to answer the survey
@@ -21,8 +21,12 @@ fi-pl:
21
21
  global:
22
22
  announcement: Ilmoitus
23
23
  clean_after_publish: Poista vastaukset julkaistaessa kysely
24
+ ends_at: Vastausajan loppumisajankohta
25
+ ends_at_help: Jätä tyhjäksi, jos vastausaikaa ei ole rajattu
24
26
  scope_id: Teema
25
27
  scopes_enabled: Teemat käytössä
28
+ starts_at: Vastausajan alkamisajankohta
29
+ starts_at_help: Jätä tyhjäksi, jos vastausaikaa ei ole rajattu
26
30
  step:
27
31
  allow_answers: Salli vastaukset
28
32
  allow_unregistered: Salli rekisteröitymättömien käyttäjien vastata tähän kyselyyn
@@ -21,8 +21,12 @@ fi:
21
21
  global:
22
22
  announcement: Ilmoitus
23
23
  clean_after_publish: Poista vastaukset julkaistaessa kysely
24
+ ends_at: Vastausajan loppumisajankohta
25
+ ends_at_help: Jätä tyhjäksi, jos vastausaikaa ei ole rajattu
24
26
  scope_id: Teema
25
27
  scopes_enabled: Teemat käytössä
28
+ starts_at: Vastausajan alkamisajankohta
29
+ starts_at_help: Jätä tyhjäksi, jos vastausaikaa ei ole rajattu
26
30
  step:
27
31
  allow_answers: Salli vastaukset
28
32
  allow_unregistered: Salli rekisteröitymättömien käyttäjien vastata tähän kyselyyn
@@ -21,8 +21,12 @@ fr-CA:
21
21
  global:
22
22
  announcement: Annonce
23
23
  clean_after_publish: Supprimer les réponses lors de la publication du sondage
24
+ ends_at: Réponses acceptées jusqu'au
25
+ ends_at_help: Laisser vide si aucune date spécifique
24
26
  scope_id: Secteur
25
27
  scopes_enabled: Secteurs activés
28
+ starts_at: Réponses acceptées du
29
+ starts_at_help: Laisser vide si aucune date spécifique
26
30
  step:
27
31
  allow_answers: Autoriser les réponses
28
32
  allow_unregistered: Autoriser les utilisateurs non inscrits à répondre à l'enquête
@@ -21,8 +21,12 @@ fr:
21
21
  global:
22
22
  announcement: Annonce
23
23
  clean_after_publish: 'Supprimer les réponses lors de la publication de l''enquête - ATTENTION : décocher après avoir fini vos tests et avoir publié l''enquête'
24
+ ends_at: Réponses acceptées jusqu'au
25
+ ends_at_help: Laisser vide si aucune date spécifique
24
26
  scope_id: Secteur
25
27
  scopes_enabled: Secteurs activés
28
+ starts_at: Réponses acceptées du
29
+ starts_at_help: Laisser vide si aucune date spécifique
26
30
  step:
27
31
  allow_answers: Autoriser les réponses
28
32
  allow_unregistered: Autoriser les utilisateurs non inscrits à répondre à l'enquête
@@ -21,12 +21,14 @@ gl:
21
21
  global:
22
22
  announcement: Anuncio
23
23
  clean_after_publish: Eliminar as respostas ao publicar a enquisa
24
+ ends_at: Respostas aceptadas até
25
+ ends_at_help: Deixar baleiro de non especificar unha data
24
26
  scope_id: Ámbito
25
27
  scopes_enabled: Ámbitos habilitados
28
+ starts_at_help: Deixar baleiro de non especificar unha data
26
29
  step:
27
30
  allow_answers: Permitir respostas
28
31
  allow_unregistered: Permitir aos usuarios non rexistrados responder a enquisa
29
- allow_unregistered_help: Se está activo, non será preciso iniciar sesión para contestar a enquisa. Isto pode comportar que os datos sexan pouco fiábeis e aumentará a vulnerabilidade a ataques automatizados. Empregar con precaución!
30
32
  announcement: Anuncio
31
33
  events:
32
34
  surveys:
@@ -58,5 +60,4 @@ gl:
58
60
  surveys:
59
61
  answer:
60
62
  invalid: Houbo erros ao responder a enquisa.
61
- spam_detected: Produciuse un problema ao contestar o formulario. É posíbel que o fixeras rápido de máis, podes tentalo de novo?
62
63
  success: A enquisa respondeu con éxito.
@@ -21,6 +21,10 @@ it:
21
21
  global:
22
22
  announcement: Annuncio
23
23
  clean_after_publish: Eliminare le risposte quando si pubblica il sondaggio
24
+ ends_at: Risposte accettate fino al
25
+ ends_at_help: Lascia vuoto se nessuna data è specificata
26
+ starts_at: Risposte accettate da
27
+ starts_at_help: Lascia vuoto se nessuna data è specificata
24
28
  step:
25
29
  allow_answers: Consenti risposte
26
30
  allow_unregistered: Consenti agli utenti non registrati di rispondere al sondaggio
@@ -21,8 +21,12 @@ nl:
21
21
  global:
22
22
  announcement: Aankondiging
23
23
  clean_after_publish: Verwijder antwoorden bij publicatie van de enquête
24
+ ends_at: Antwoorden geaccepteerd tot
25
+ ends_at_help: Laat leeg voor geen specifieke datum
24
26
  scope_id: Scope
25
27
  scopes_enabled: Scopes ingeschakeld
28
+ starts_at: Antwoorden geaccepteerd vanaf
29
+ starts_at_help: Laat leeg voor geen specifieke datum
26
30
  step:
27
31
  allow_answers: Antwoorden toestaan
28
32
  allow_unregistered: Sta niet-geregistreerde gebruikers toe om de enquête te beantwoorden
@@ -25,8 +25,12 @@ pl:
25
25
  global:
26
26
  announcement: Ogłoszenie
27
27
  clean_after_publish: Usuń odpowiedzi podczas publikowania ankiety
28
+ ends_at: Odpowiedzi akceptowane do
29
+ ends_at_help: Pozostaw puste jeśli nie określono daty
28
30
  scope_id: Zakres
29
31
  scopes_enabled: Zakresy włączone
32
+ starts_at: Odpowiedzi akceptowane od
33
+ starts_at_help: Pozostaw puste jeśli nie określono daty
30
34
  step:
31
35
  allow_answers: Pozwól na wypełnianie
32
36
  allow_unregistered: Pozwól niezarejestrowanym użytkownikom wypełnić ankietę
@@ -23,8 +23,6 @@ ro:
23
23
  global:
24
24
  announcement: Anunţ
25
25
  clean_after_publish: Ștergeți răspunsurile la publicarea sondajului
26
- scope_id: Domeniu de interes
27
- scopes_enabled: Domenii de interes activate
28
26
  step:
29
27
  allow_answers: Permite răspunsuri
30
28
  allow_unregistered: Permite utilizatorilor neînregistrați să răspundă la chestionar
@@ -21,8 +21,6 @@ sv:
21
21
  global:
22
22
  announcement: Meddelande
23
23
  clean_after_publish: Ta bort svar vid publicering av enkäten
24
- scope_id: Omfång
25
- scopes_enabled: Omfång aktiverade
26
24
  step:
27
25
  allow_answers: Tillåt svar
28
26
  allow_unregistered: Tillåt ej registrerade användare att besvara enkäten
@@ -21,8 +21,12 @@ tr:
21
21
  global:
22
22
  announcement: Duyuru
23
23
  clean_after_publish: Anketi yayınlarken cevapları sil
24
+ ends_at: Şu tarihe kadar kabul edilen cevaplar
25
+ ends_at_help: Belirli bir tarih için boş bırakın
24
26
  scope_id: Kapsam
25
27
  scopes_enabled: Kapsamlar etkinleştirildi
28
+ starts_at: Cevaplar kabul edildi
29
+ starts_at_help: Belirli bir tarih için boş bırakın
26
30
  step:
27
31
  allow_answers: Cevaplara izin ver
28
32
  allow_unregistered: Kayıtlı olmayan kullanıcıların anketi yanıtlamasına izin verin
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Surveys
5
+ class SurveyType < Decidim::Api::Types::BaseObject
6
+ description "A survey"
7
+
8
+ field :id, GraphQL::Types::ID, "The internal ID for this survey", null: false
9
+ field :created_at, Decidim::Core::DateTimeType, "The time this survey was created", null: true
10
+ field :updated_at, Decidim::Core::DateTimeType, "The time this survey was updated", null: true
11
+ field :questionnaire, Decidim::Forms::QuestionnaireType, "The questionnaire for this survey", null: true
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Surveys
5
+ class SurveysType < Decidim::Api::Types::BaseObject
6
+ implements Decidim::Core::ComponentInterface
7
+
8
+ graphql_name "Surveys"
9
+ description "A surveys component of a participatory space."
10
+
11
+ field :surveys, Decidim::Surveys::SurveyType.connection_type, null: true, connection: true
12
+
13
+ def surveys
14
+ Survey.where(component: object).includes(:component)
15
+ end
16
+
17
+ field :survey, Decidim::Surveys::SurveyType, null: true do
18
+ argument :id, GraphQL::Types::ID, required: true
19
+ end
20
+
21
+ def survey(**args)
22
+ Survey.where(component: object).find_by(id: args[:id])
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Surveys
5
+ autoload :SurveyType, "decidim/api/survey_type"
6
+ autoload :SurveysType, "decidim/api/surveys_type"
7
+ end
8
+ end
@@ -57,6 +57,8 @@ Decidim.register_component(:surveys) do |component|
57
57
  component.settings(:global) do |settings|
58
58
  settings.attribute :scopes_enabled, type: :boolean, default: false
59
59
  settings.attribute :scope_id, type: :scope
60
+ settings.attribute :starts_at, type: :time
61
+ settings.attribute :ends_at, type: :time
60
62
  settings.attribute :announcement, type: :text, translated: true, editor: true
61
63
  settings.attribute :clean_after_publish, type: :boolean, default: true
62
64
  end
@@ -103,10 +105,10 @@ Decidim.register_component(:surveys) do |component|
103
105
  questionnaire = Decidim::Forms::Questionnaire.new(
104
106
  title: Decidim::Faker::Localized.paragraph,
105
107
  description: Decidim::Faker::Localized.wrapped("<p>", "</p>") do
106
- Decidim::Faker::Localized.paragraph(3)
108
+ Decidim::Faker::Localized.paragraph(sentence_count: 3)
107
109
  end,
108
110
  tos: Decidim::Faker::Localized.wrapped("<p>", "</p>") do
109
- Decidim::Faker::Localized.paragraph(2)
111
+ Decidim::Faker::Localized.paragraph(sentence_count: 2)
110
112
  end
111
113
  )
112
114
 
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-surveys version.
5
5
  module Surveys
6
6
  def self.version
7
- "0.23.6"
7
+ "0.24.0.rc1"
8
8
  end
9
9
  end
10
10
  end
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "decidim/surveys/admin"
4
+ require "decidim/surveys/api"
4
5
  require "decidim/surveys/engine"
5
6
  require "decidim/surveys/admin_engine"
6
7
  require "decidim/surveys/component"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-surveys
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.23.6
4
+ version: 0.24.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep Jaume Rey Peroy
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-05-10 00:00:00.000000000 Z
13
+ date: 2021-03-01 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: decidim-core
@@ -18,84 +18,84 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 0.23.6
21
+ version: 0.24.0.rc1
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - '='
27
27
  - !ruby/object:Gem::Version
28
- version: 0.23.6
28
+ version: 0.24.0.rc1
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: decidim-forms
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 0.23.6
35
+ version: 0.24.0.rc1
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - '='
41
41
  - !ruby/object:Gem::Version
42
- version: 0.23.6
42
+ version: 0.24.0.rc1
43
43
  - !ruby/object:Gem::Dependency
44
- name: decidim-admin
44
+ name: decidim-templates
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - '='
48
48
  - !ruby/object:Gem::Version
49
- version: 0.23.6
50
- type: :development
49
+ version: 0.24.0.rc1
50
+ type: :runtime
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
54
  - - '='
55
55
  - !ruby/object:Gem::Version
56
- version: 0.23.6
56
+ version: 0.24.0.rc1
57
57
  - !ruby/object:Gem::Dependency
58
- name: decidim-dev
58
+ name: decidim-admin
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
61
  - - '='
62
62
  - !ruby/object:Gem::Version
63
- version: 0.23.6
63
+ version: 0.24.0.rc1
64
64
  type: :development
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - '='
69
69
  - !ruby/object:Gem::Version
70
- version: 0.23.6
70
+ version: 0.24.0.rc1
71
71
  - !ruby/object:Gem::Dependency
72
- name: decidim-participatory_processes
72
+ name: decidim-dev
73
73
  requirement: !ruby/object:Gem::Requirement
74
74
  requirements:
75
75
  - - '='
76
76
  - !ruby/object:Gem::Version
77
- version: 0.23.6
77
+ version: 0.24.0.rc1
78
78
  type: :development
79
79
  prerelease: false
80
80
  version_requirements: !ruby/object:Gem::Requirement
81
81
  requirements:
82
82
  - - '='
83
83
  - !ruby/object:Gem::Version
84
- version: 0.23.6
84
+ version: 0.24.0.rc1
85
85
  - !ruby/object:Gem::Dependency
86
- name: decidim-templates
86
+ name: decidim-participatory_processes
87
87
  requirement: !ruby/object:Gem::Requirement
88
88
  requirements:
89
89
  - - '='
90
90
  - !ruby/object:Gem::Version
91
- version: 0.23.6
91
+ version: 0.24.0.rc1
92
92
  type: :development
93
93
  prerelease: false
94
94
  version_requirements: !ruby/object:Gem::Requirement
95
95
  requirements:
96
96
  - - '='
97
97
  - !ruby/object:Gem::Version
98
- version: 0.23.6
98
+ version: 0.24.0.rc1
99
99
  description: A surveys component for decidim's participatory spaces.
100
100
  email:
101
101
  - josepjaume@gmail.com
@@ -127,8 +127,6 @@ files:
127
127
  - app/queries/decidim/surveys/metrics/survey_participants_metric_measure.rb
128
128
  - app/serializers/decidim/surveys/data_importer.rb
129
129
  - app/serializers/decidim/surveys/data_serializer.rb
130
- - app/types/decidim/surveys/survey_type.rb
131
- - app/types/decidim/surveys/surveys_type.rb
132
130
  - app/views/decidim/surveys/surveys/no_permission.html.erb
133
131
  - config/locales/am-ET.yml
134
132
  - config/locales/ar-SA.yml
@@ -220,9 +218,12 @@ files:
220
218
  - db/migrate/20200610090725_remove_survey_answers.rb
221
219
  - db/migrate/20200610090845_remove_survey_questions.rb
222
220
  - db/migrate/20200610105927_remove_survey_columns.rb
221
+ - lib/decidim/api/survey_type.rb
222
+ - lib/decidim/api/surveys_type.rb
223
223
  - lib/decidim/surveys.rb
224
224
  - lib/decidim/surveys/admin.rb
225
225
  - lib/decidim/surveys/admin_engine.rb
226
+ - lib/decidim/surveys/api.rb
226
227
  - lib/decidim/surveys/component.rb
227
228
  - lib/decidim/surveys/engine.rb
228
229
  - lib/decidim/surveys/test/factories.rb
@@ -240,14 +241,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
240
241
  requirements:
241
242
  - - ">="
242
243
  - !ruby/object:Gem::Version
243
- version: '2.6'
244
+ version: '2.7'
244
245
  required_rubygems_version: !ruby/object:Gem::Requirement
245
246
  requirements:
246
- - - ">="
247
+ - - ">"
247
248
  - !ruby/object:Gem::Version
248
- version: '0'
249
+ version: 1.3.1
249
250
  requirements: []
250
- rubygems_version: 3.0.3
251
+ rubygems_version: 3.1.2
251
252
  signing_key:
252
253
  specification_version: 4
253
254
  summary: Decidim surveys module
@@ -1,15 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Decidim
4
- module Surveys
5
- SurveyType = GraphQL::ObjectType.define do
6
- name "Survey"
7
- description "A survey"
8
-
9
- field :id, !types.ID, "The internal ID for this survey"
10
- field :createdAt, Decidim::Core::DateTimeType, "The time this survey was created", property: :created_at
11
- field :updatedAt, Decidim::Core::DateTimeType, "The time this survey was updated", property: :updated_at
12
- field :questionnaire, Decidim::Forms::QuestionnaireType, "The questionnaire for this survey"
13
- end
14
- end
15
- end
@@ -1,32 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Decidim
4
- module Surveys
5
- SurveysType = GraphQL::ObjectType.define do
6
- interfaces [-> { Decidim::Core::ComponentInterface }]
7
-
8
- name "Surveys"
9
- description "A surveys component of a participatory space."
10
-
11
- connection :surveys, SurveyType.connection_type do
12
- resolve ->(component, _args, _ctx) {
13
- SurveysTypeHelper.base_scope(component).includes(:component)
14
- }
15
- end
16
-
17
- field(:survey, SurveyType) do
18
- argument :id, !types.ID
19
-
20
- resolve ->(component, args, _ctx) {
21
- SurveysTypeHelper.base_scope(component).find_by(id: args[:id])
22
- }
23
- end
24
- end
25
-
26
- module SurveysTypeHelper
27
- def self.base_scope(component)
28
- Survey.where(component: component)
29
- end
30
- end
31
- end
32
- end