I believe I saw something like this when I was trying to pass an array 
through strong_parameters. I discovered arrays (and other complex data 
types) have to be the last parameter(s) passed to the permit() method. 
Perhaps there is something similar going on with protected_attributes?

Chris

On Friday, October 24, 2014 12:09:01 AM UTC-7, Gisborne wrote:
>
> Hey, folks. 
>
> I’m just starting in on a Rails 4 project (I know, I know). I’ve come in 
> part-way through. it’s using the latest version of protected_attributes. 
>
> I’m getting this: 
>
> NoMethodError: undefined method `sanitize' for false:FalseClass 
> /Users/guyren/.rvm/gems/ruby-2.1.0/gems/protected_attributes-1.0.8/lib/active_model/mass_assignment_security.rb:346:in
>  
> `sanitize_for_mass_assignment' 
>
> which is where the gem asks itself for a sanitizer object and fails. 
>
> I’ve got: 
>
>     config.active_record.whitelist_attributes = true 
>
> I believe the problem arises in some fashion from the object I’m trying to 
> save having a json field. 
>
> Google is not helping me here. Has anyone got a quick answer before I 
> start grubbing around in the innards of this thing? 
>
> Regards, 
>
> Guyren G Howe 
> Relevant Logic LLC 
>
> guyren-at-relevantlogic.com ~ http://relevantlogic.com ~ +1 512 784 3178 
>
> Ruby/Rails,  Xojo, PHP programming 
> PostgreSQL, MySQL database design and consulting 
> Technical writing and training 
>
> Read my book, Real OOP with REALbasic: <
> http://relevantlogic.com/oop-book/about-the-oop-book.php> 
>
>

-- 
-- 
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby
--- 
You received this message because you are subscribed to the Google Groups "SD 
Ruby" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to