ruby on rails - JBuilder as_json to_json -
does jbuilder use as_json or to_json render?
i attempting override as_json , to_json alias, similar below:
module bson class objectid def as_json(*args) to_s end alias :to_json :as_json end end
then use jbuilder render return object. however, acts if using neither to_json or as_json render.
Comments
Post a Comment