Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Subscribe and unsubscribe users to individual mailchimp campaigns.
Update Mailchimp whenever a user changes their demographics
This requires Rails 6+ and Twitter Bootstrap 4 and just works with Devise.
Please first install the effective_datatables gem.
Please download and install the Twitter Bootstrap4
Add to your Gemfile:
gem 'haml'
gem 'effective_mailchimp'
Run the bundle command to install it:
bundle install
Then run the generator:
rails generate effective_mailchimp:install
The generator will install an initializer which describes all configuration options and creates a database migration.
If you want to tweak the table names, manually adjust both the configuration file and the migration now.
Then migrate the database:
rake db:migrate
Please add the following to your User model:
effective_mailchimp_user
and
Add a link to the admin menu:
- if can? :admin, :effective_mailchimp
- if can? :index, Effective::MailchimpList
= nav_link_to 'Mailchimp lists', effective_mailchimp.admin_mailchimp_lists_path
To add the fields to your existing users form
= form_with(model: user) do |f|
= f.text_field :first_name
= f.text_field :last_name
= mailchimp_user_fields(f)
= f.submit
Refer to the Marketing API Quick Start
https://mailchimp.com/developer/marketing/guides/quick-start/
Sign up for a Mailchimp account. Create a campaign.
Get API key from:
Visit https://us7.admin.mailchimp.com/account/api/
Click Create an API Key
Get your server from the domain. us7 in the above example.
All authorization checks are handled via the effective_resources gem found in the config/initializers/effective_resources.rb
file.
The permissions you actually want to define are as follows (using CanCan):
if user.persisted?
end
if user.admin?
can :admin, :effective_mailchimp
can([:index, :edit, :update], Effective::MailchimpList)
can(:can_subscribe, Effective::MailchimpList) { |list| !list.can_subscribe? }
can(:cannot_subscribe, Effective::MailchimpList) { |list| list.can_subscribe? }
end
MIT License. Copyright Code and Effect Inc.
Run tests by:
rails test
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that effective_mailchimp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.