Skip to content
This repository has been archived by the owner on Feb 11, 2020. It is now read-only.

Updates for Rails 3.2.3 and CreateSend 1.0.3 #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Updates for Rails 3.2.3 and CreateSend 1.0.3 #7

wants to merge 2 commits into from

Conversation

0xafaebabe
Copy link

In Rails 3.2.3, the ActiveRecord whitelist_attributes is true. Rather than turning this off and losing the added security, I updated the prelaunch_subscriber model so that the email attribute can be mass assigned. Without this update, you will receive a mass assignment exception. Secondly, the old version of the CreateSend gem (~0.2) emits a MultiJSON parse error; upgrading to a version of CreateSend of at least 1.0.0 fixes this issue.

This is my first pull request so apologies if I've done it all wrong! I could not get the tests to run on my environment so I was not able to update them. Please let me know if there's things I could have done better for future reference. Thanks for all your work on this gem, it's made our lives a lot easier!

Jesse Jack added 2 commits June 11, 2012 16:13
ActiveRecord whitelist_attributes is set to true by default as of Rails 3.2.3. Any attributes that should be mass assignable need to be enabled by attr_accessor. This change makes that so on prelaunch_subscriber so that one does not have to disable whitelist_attributes which is an important security feature.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant