title: Including a model's virtual attributes when converting a record to JSON in Rails
body: <p>I'm trying to convert an ActiveRecord model to JSON in Rails, and while the to_json method generally works, the model's virtual attributes are not included.  Is there a way within Rails to list not just the attributes of a model, but also it's attr_accessor and attr_reader attributes in order that all readable attributes are available when the model is converted to JSON?</p>