Yes of course... it makes so much sense !
Thanks for your help. I think I have one final grip, is once you
modified your array etc. you have to save it so your changes persists
to the db right ?
So let's suppose we are in a function defined in your model:
def follow!(obj)
send :following=, [] if (following.nil?)
following <<
obj.id unless following.include?(
obj.id)
self.save
end
The problem is by doing this I only modified my "following" array, the
validation does not go through.
So instead I do save that way: save :validation => false
But even this does not work, I get my traditional your password is too
short blabla because of this:
validates_length_of :password, :minimum => 6, :maximum => 40
How can I get around that ?
Thanks,
Alex