aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
diff options
context:
space:
mode:
authorWilliam Johnston <will@johnstonclan.net>2016-07-02 18:13:35 -0500
committerWilliam Johnston <will@johnstonclan.net>2016-07-02 18:13:35 -0500
commitb96e5ea2e158d5f19406a4b25f7a5b5945c5cb2f (patch)
tree402fc4562c03935835def58ab5cd5930b186119d /guides/source
parent6a77398cc194070da00dc8e5bea773fa7b792444 (diff)
downloadrails-b96e5ea2e158d5f19406a4b25f7a5b5945c5cb2f.tar.gz
rails-b96e5ea2e158d5f19406a4b25f7a5b5945c5cb2f.tar.bz2
rails-b96e5ea2e158d5f19406a4b25f7a5b5945c5cb2f.zip
Update Rails 5 release notes with syntax fixes.
Diffstat (limited to 'guides/source')
-rw-r--r--guides/source/5_0_release_notes.md7
1 files changed, 4 insertions, 3 deletions
diff --git a/guides/source/5_0_release_notes.md b/guides/source/5_0_release_notes.md
index bdd1c2cc4e..b542005f52 100644
--- a/guides/source/5_0_release_notes.md
+++ b/guides/source/5_0_release_notes.md
@@ -90,6 +90,7 @@ It also changes the behavior of values passed to `ActiveRecord::Base.where`, whi
without having to rely on implementation details or monkey patching.
Some things that you can achieve with this:
+
* The type detected by Active Record can be overridden.
* A default can also be provided.
* Attributes do not need to be backed by a database column.
@@ -130,8 +131,8 @@ model.attributes #=> {field_without_db_column: [1, 2, 3]}
**Creating Custom Types:**
You can define your own custom types, as long as they respond
-to the methods defined on the value type. The method +deserialize+ or
-+cast+ will be called on your type object, with raw input from the
+to the methods defined on the value type. The method `deserialize` or
+`cast` will be called on your type object, with raw input from the
database or from your controllers. This is useful, for example, when doing custom conversion,
like Money data.
@@ -139,7 +140,7 @@ like Money data.
When `ActiveRecord::Base.where` is called, it will
use the type defined by the model class to convert the value to SQL,
-calling +serialize+ on your type object.
+calling `serialize` on your type object.
This gives the objects ability to specify, how to convert values when performing SQL queries.