|
14 | 14 |
|
15 | 15 | *Petrik de Heus*
|
16 | 16 |
|
17 |
| -* Validate using `:on` option when using `validates_associated` |
18 |
| - |
19 |
| - Fixes an issue where `validates_associated` `:on` option wasn't respected |
20 |
| - when validated associated records. |
| 17 | +* Fixes an issue where `validates_associated` `:on` option wasn't respected |
| 18 | + when validating associated records. |
21 | 19 |
|
22 | 20 | *Austen Madden*, *Alex Ghiculescu*, *Rafał Brize*
|
23 | 21 |
|
24 |
| -* Allow overriding SQLite defaults from `database.yml` |
| 22 | +* Allow overriding SQLite defaults from `database.yml`. |
25 | 23 |
|
26 |
| - Any PRAGMA configuration set under the `pragmas` key in the configuration file take precedence over Rails' defaults, and additional PRAGMAs can be set as well. |
| 24 | + Any PRAGMA configuration set under the `pragmas` key in the configuration |
| 25 | + file takes precedence over Rails' defaults, and additional PRAGMAs can be |
| 26 | + set as well. |
27 | 27 |
|
28 | 28 | ```yaml
|
29 | 29 | database: storage/development.sqlite3
|
|
35 | 35 |
|
36 | 36 | *Stephen Margheim*
|
37 | 37 |
|
38 |
| -* Remove warning message when running SQLite in production, but leave it unconfigured |
| 38 | +* Remove warning message when running SQLite in production, but leave it unconfigured. |
39 | 39 |
|
40 |
| - There are valid use cases for running SQLite in production, however it must be done |
| 40 | + There are valid use cases for running SQLite in production. However it must be done |
41 | 41 | with care, so instead of a warning most users won't see anyway, it's preferable to
|
42 | 42 | leave the configuration commented out to force them to think about having the database
|
43 | 43 | on a persistent volume etc.
|
44 | 44 |
|
45 | 45 | *Jacopo Beschi*, *Jean Boussier*
|
46 | 46 |
|
47 |
| -* Add support for generated columns in SQLite3 adapter |
| 47 | +* Add support for generated columns to the SQLite3 adapter. |
48 | 48 |
|
49 | 49 | Generated columns (both stored and dynamic) are supported since version 3.31.0 of SQLite.
|
50 | 50 | This adds support for those to the SQLite3 adapter.
|
|
61 | 61 |
|
62 | 62 | * TrilogyAdapter: ignore `host` if `socket` parameter is set.
|
63 | 63 |
|
64 |
| - This allows to configure a connection on a UNIX socket via DATABASE_URL: |
| 64 | + This allows to configure a connection on a UNIX socket via `DATABASE_URL`: |
65 | 65 |
|
66 | 66 | ```
|
67 | 67 | DATABASE_URL=trilogy://does-not-matter/my_db_production?socket=/var/run/mysql.sock
|
68 | 68 | ```
|
69 | 69 |
|
70 | 70 | *Jean Boussier*
|
71 | 71 |
|
72 |
| -* Make `assert_queries_count`, `assert_no_queries`, `assert_queries_match` and |
| 72 | +* Make `assert_queries_count`, `assert_no_queries`, `assert_queries_match`, and |
73 | 73 | `assert_no_queries_match` assertions public.
|
74 | 74 |
|
75 | 75 | To assert the expected number of queries are made, Rails internally uses `assert_queries_count` and
|
|
114 | 114 |
|
115 | 115 | *Kevin McPhillips*
|
116 | 116 |
|
117 |
| -* `DatabaseConfigurations#configs_for` can accept a symbol in the `name` parameter. |
| 117 | +* `DatabaseConfigurations#configs_for` accepts a symbol in the `name` parameter. |
118 | 118 |
|
119 | 119 | *Andrew Novoselac*
|
120 | 120 |
|
|
140 | 140 | Post.first.inspect #=> "#<Post id: 1, title: "Hello, World!">"
|
141 | 141 | ```
|
142 | 142 |
|
143 |
| - With the `attributes_for_inspect` set to `:all`, `inspect` will list all the record's attributes. |
| 143 | + With `attributes_for_inspect` set to `:all`, `inspect` will list all the record's attributes. |
144 | 144 |
|
145 | 145 | ```ruby
|
146 | 146 | Post.attributes_for_inspect = :all
|
147 | 147 | Post.first.inspect #=> "#<Post id: 1, title: "Hello, World!", published_at: "2023-10-23 14:28:11 +0000">"
|
148 | 148 | ```
|
149 | 149 |
|
150 |
| - In development and test mode, `attributes_for_inspect` will be set to `:all` by default. |
| 150 | + In `development` and `test` mode, `attributes_for_inspect` will be set to `:all` by default. |
151 | 151 |
|
152 | 152 | You can also call `full_inspect` to get an inspection with all the attributes.
|
153 | 153 |
|
154 | 154 | The attributes in `attribute_for_inspect` will also be used for `pretty_print`.
|
155 | 155 |
|
156 | 156 | *Andrew Novoselac*
|
157 | 157 |
|
158 |
| -* Don't mark Float::INFINITY as changed when reassigning it |
159 |
| - |
160 |
| - When saving a record with a float infinite value, it shouldn't mark as changed |
| 158 | +* Don't mark attributes as changed when reassigned to `Float::INFINITY` or |
| 159 | + `-Float::INFINITY`. |
161 | 160 |
|
162 | 161 | *Maicol Bentancor*
|
163 | 162 |
|
164 |
| -* Support `RETURNING` clause for MariaDB |
| 163 | +* Support the `RETURNING` clause for MariaDB. |
165 | 164 |
|
166 | 165 | *fatkodima*, *Nikolay Kondratyev*
|
167 | 166 |
|
168 |
| -* The SQLite3 adapter now implements the `supports_deferrable_constraints?` contract |
| 167 | +* The SQLite3 adapter now implements the `supports_deferrable_constraints?` contract. |
169 | 168 |
|
170 | 169 | Allows foreign keys to be deferred by adding the `:deferrable` key to the `foreign_key` options.
|
171 | 170 |
|
|
176 | 175 |
|
177 | 176 | *Stephen Margheim*
|
178 | 177 |
|
179 |
| -* Add `set_constraints` helper for PostgreSQL |
| 178 | +* Add the `set_constraints` helper to PostgreSQL connections. |
180 | 179 |
|
181 | 180 | ```ruby
|
182 | 181 | Post.create!(user_id: -1) # => ActiveRecord::InvalidForeignKey
|
|
192 | 191 |
|
193 | 192 | *Cody Cutrer*
|
194 | 193 |
|
195 |
| -* Include `ActiveModel::API` in `ActiveRecord::Base` |
| 194 | +* Include `ActiveModel::API` in `ActiveRecord::Base`. |
196 | 195 |
|
197 | 196 | *Sean Doyle*
|
198 | 197 |
|
|
0 commit comments