When browsing through the ActiveRecord code I came across this method and I thought it could be made a bit more clear, so I refactored it. I think this is the most I could do safely within the boundaries of this method.
Let me know if you think it is useful.
Refactored method arel_attributes_values.
I think can take it one step further and get rid of the flag parameters in arel_attributes_values as well, will add it to the pull request.
Removed flag attributes.
@robinroestenburg yes please. I'll merge after you've updated the request.
@tenderlove it's already there - I updated it right after the comment, check the a02d237 commit.