Mass Assignment #1

Closed
aaronchi opened this Issue Jan 30, 2012 · 4 comments

Comments

Projects
None yet
2 participants

The plugin doesn't account for the new Rails 3.2 strict mass assignment setting. It would be nice if the methods that added likes and follows used :without_protection => true or some other method to avoid mass assignment errors.

Owner

cmer commented Jan 30, 2012

Would you mind sending a pull request for this? The code should be fairly easy to understand. Thanks!

yah. Can do it when I have some time. Looking at this as a potential replacement for acts_as_follower but it seems to have some other issues as well. For example: object.followers returns an array instead of a scoped method that you can apply other scopes to.

Owner

cmer commented Jan 30, 2012

I've been using the code in production for ~3 weeks and it's been super stable.

I agree with you with the .followers array. I never got around to changing it, it should definitely be a scoped method.

Owner

cmer commented Feb 21, 2012

@aaronchi See issue #2 about your second request (scope).

cmer closed this in 5bf34c8 Feb 22, 2012

@listrophy listrophy added a commit to listrophy/socialization that referenced this issue Apr 17, 2012

@listrophy listrophy Use block form of create to work across AR versions.
- The :without_protection flag only works on newer ActiveRecord versions.
- Fixes #1 (for more versions of ActiveRecord)
46d5da4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment