Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
This gem encapsulates the logic to create and manage forms, so it can be reused in other modules, like surveys and meetings.
A Decidim::Forms::Question
must be of one of the types:
Here are the relations between the classes of a Decidim::Questionnaire
:
1..* +----------+ 1..* +--------------+
+------------->| Question |------------->| AnswerOption |
| +-----+----+ +------+-------+
| ^ 1..1 ^ 1..*
| | |
| | |
+-------+-------+ 1..* +---+----+ 1..* +------+-------+
| Questionnaire +------->| Answer |<-------------+ AnswerChoice |
+---------------+ +---+----+ +--------------+
|
|
v 1..1
+--+---+
| User |
+------+
Add this line to your module's gemspec:
s.add_dependency "decidim-forms", Decidim::YourModule.version
And then execute:
bundle
See Decidim.
See Decidim.
Since questionnaires cannot exist without a component we are not including specific seeds for this engine.
Other engines are free to include questionnaires on their seeds like this:
Decidim::Forms::Questionnaire.new(
title: Decidim::Faker::Localized.paragraph,
description: Decidim::Faker::Localized.wrapped("<p>", "</p>") do
Decidim::Faker::Localized.paragraph(3)
end,
tos: Decidim::Faker::Localized.wrapped("<p>", "</p>") do
Decidim::Faker::Localized.paragraph(2)
end,
)
Decidim::Surveys::Survey.create!(component: component, questionnaire: questionnaire)
%w(short_answer long_answer).each do |text_question_type|
Decidim::Forms::Question.create!(
questionnaire: questionnaire,
body: Decidim::Faker::Localized.paragraph,
question_type: text_question_type
)
end
%w(single_option multiple_option).each do |multiple_choice_question_type|
question = Decidim::Forms::Question.create!(
questionnaire: questionnaire,
body: Decidim::Faker::Localized.paragraph,
question_type: multiple_choice_question_type
)
3.times do
question.answer_options.create!(body: Decidim::Faker::Localized.sentence)
end
end
FAQs
Unknown package
We found that decidim-forms demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.