Question about Rails magic:
I played with IRB and spoiled? method, then I just did the following:
>> User.first.attributes.collect { |column, value| [column, value.tainted?] } => [["phone", true], ["state", false], ["persistence_token", true], ["last_login_ip", true], ["country", true], ["login_count", false], ["last_request_at", false], ["id", false], ["forname", true], ["current_login_at", false], ["name", true]]
Does anyone know why some of the parameters are corrupted and some are not? And if there is a way to choose which column should be corrupted?
EDIT :
Thanks for answers.
@sgtFloyd: I just tried to manually update the country. and here is what happens:
>> u = User.first >> u.country = "USA" => "USA" >> u.country.tainted? => false >> u.save => true >> u.country.tainted? => false >> u.reload >> u.country.tainted? => true >> u.country.class => String
EDIT 2 :
I deleted everything inside the User model, and some String columns did not look tarnished, while some of them ...
Thanks a lot!