I have the following object that has been created
@post = Post.create(:name => 'test', :post_number => 20, :active => true)
Once this is saved, I want to be able to get the object back to a hash, e.g. by doing somthing like:
@object.to_hash
How is this possible from within rails?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…