<commit_before>= Devise MailJet

Devise MailJet adds a MailJet option to {devise}[https://github.com/plataformatec/devise] that easily enables users
to join your mailing list when they create an account.

{Delayed Job}[https://github.com/collectiveidea/delayed_job] is used automatically if your project uses it, and the
mapping between list names and list ids is cached automatically.

== Getting started

In your Gemfile, add devise_mailjet after devise:

  gem "devise"
  gem "devise_mailjet"  # Last officially released gem

In your User model, add :mailjet to the devise call and make :join_mailing_list accessible:

  devise :database_authenticatable, ..., :mailjet
  attr_accessible :join_mailing_list

In your devise initializer (config/initializers/devise.rb), set your API key and mailing list name:

  Devise.mailjet_api_key = 'your_api_key'
  Devise.mailing_list_name = 'List Name'
  Devise.double_opt_in = false  
  Devise.send_welcome_email = false  

If you are using the default Devise registration views, the Join Mailing List checkbox is added automatically, if not,
either include the form partial in your new registration form:

  <%= render :partial => "devise/shared/mailjet/form", :locals => {:form => f} %>

Or manually add a "Join Mailing List" checkbox to your new registration form:

  <%= form.check_box :join_mailing_list %>

If you are using Simple Form, you can use:

  <%= f.input :join_mailing_list, :as => :boolean %>

== Configuration
<commit_msg>Review setup process. Fix #2<commit_after>= Devise MailJet

Devise MailJet adds a MailJet option to {devise}[https://github.com/plataformatec/devise] that easily enables users
to join your mailing list when they create an account.

{Delayed Job}[https://github.com/collectiveidea/delayed_job] is used automatically if your project uses it, and the
mapping between list names and list ids is cached automatically.

== Getting started

In your Gemfile, add devise_mailjet after devise:

  gem "devise"
  gem "devise_mailjet"  # Last officially released gem

In your User model, add :mailjet to the devise call and make :join_mailing_list accessible:

  devise :database_authenticatable, ..., :mailjet
  attr_accessor :join_mailing_list

In your devise initializer (config/initializers/devise.rb), set your API key and mailing list name:

  Devise.mailjet_api_key = 'your_api_key'
  Devise.mailing_list_name = 'List Name'
  Devise.send_welcome_email = false  

If you are using the default Devise registration views, the Join Mailing List checkbox is added automatically, if not,
either include the form partial in your new registration form:

  <%= render :partial => "devise/shared/mailjet/form", :locals => {:form => f} %>

Or manually add a "Join Mailing List" checkbox to your new registration form:

  <%= form.check_box :join_mailing_list %>

If you are using Simple Form, you can use:

  <%= f.input :join_mailing_list, :as => :boolean %>

== Configuration

{'fraction_non_alphanumeric': 0.08084239130434782, 'fraction_numerical': 0.00033967391304347825, 'mean_word_length': 4.751953125, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 17, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7335907', 'n_tokens_mistral': 910, 'n_tokens_neox': 854, 'n_words': 340}