Works well. Today I was working with how Rail's works with BigDecimals, so (knowing the answer) I asked:
"When using "as_json" in a controller to return the JSON of a model, how are BigDecimal's encoded?"
Answer: "When using as_json in a controller to return the JSON of a model, BigDecimal values are encoded as strings. This behavior is defined in the active_support/core_ext/object/json.rb file, specifically in the BigDecimal class extension for JSON encoding. The rationale behind this approach is that most..." which is exactly the case as I learnt through various PR's, Issues and code review.
This would have saved me about 30mins of work. I wonder if it takes into account the metadata, such as authors, related comments, issues and PRs?
Thanks for checking it out! Currently no metadata, just code. Were adding commit messages and PRs next. Issues and comments makes a lot of sense, adding that to the list.
We don't do direct look up/indexing for authors (although the authors file is usually somewhere in the repo for larger projects), comments, issues, or PRs just yet but that is definitely something we are looking to add.
"When using "as_json" in a controller to return the JSON of a model, how are BigDecimal's encoded?"
Answer: "When using as_json in a controller to return the JSON of a model, BigDecimal values are encoded as strings. This behavior is defined in the active_support/core_ext/object/json.rb file, specifically in the BigDecimal class extension for JSON encoding. The rationale behind this approach is that most..." which is exactly the case as I learnt through various PR's, Issues and code review.
This would have saved me about 30mins of work. I wonder if it takes into account the metadata, such as authors, related comments, issues and PRs?