After getting all values from model, I want to add another custom attribute to the ActiveRecord class (this attribute is not a column in db) so that I could use it in view, but
If it temporary, you can try this:
@test.all.map{ |t| t.attributes.merge({ newatt: "added string" }) }