2 ms·
I'm not a Rails guy, so you'll have to forgive ignorance here. Are you telling me that Rails only lets you blacklist parameters, not whitelist? Because that se
by untog 14y ago
I'm not a Rails guy, so you'll have to forgive ignorance here. Are you telling me that Rails only lets you blacklist parameters, not whitelist?
Because that seems entirely the wrong way around.
EDIT: looked at the link posted elsewhere here[1] and ound that it is possible to whitelist using "attr_accessible". Please tell me people know about and use this.
[1] http://guides.rubyonrails.org/security.html#mass-assignment http://guides.rubyonrails.org/security.html#mass-assignment
- bryanlarsen 14y agoYou can do either. The default used to be blacklist, but that was changed to whitelist recently.
- bob_p 14y agoYou can do either. Whitelist is obviously preferred.
- alanpca 14y agoIt allows either.