1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

8 commits

Author SHA1 Message Date
Viktor Fonic
ea2850b96a Docs: Fix output representation [ci skip]
The output of two string attributes is displayed differently in the docs. Standardize the output by always showing it as a comment.
2017-05-31 10:21:51 +08:00
Tsukuru Tanimichi
d1ca18d21f No need to check nil
```ruby
nil.respond_to?(:stringify_keys) # => false
```

```ruby
include ActiveModel::AttributeAssignment
Object.new.assign_attributes(nil) #  => ArgumentError: When assigning attributes, you must pass a hash as an argument.
```
2017-04-02 13:42:14 +09:00
Xavier Noria
80e66cc4d9 normalizes indentation and whitespace across the project 2016-08-06 20:16:27 +02:00
Xavier Noria
18a2513729 applies new string literal convention in activemodel/lib
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
2016-08-06 18:38:02 +02:00
Thomas Walpole
85f7d955f3 Update and fix forbidden attributes tests
Add AC::Parameters tests for WhereChain#not
2015-11-03 11:34:07 -08:00
Robin Dupret
95c2fc9679 Follow-up to #10776
The name `ActiveModel::AttributeAssignment::UnknownAttributeError` is
too implementation specific so let's move the constant directly under
the ActiveModel namespace.

Also since this constant used to be under the ActiveRecord namespace, to
make the upgrade path easier, let's avoid raising the former constant
when we deal with this error on the Active Record side.
2015-02-26 15:40:03 +01:00
Sean Griffin
a225d4bec5 ✂️ and 💅 for #10776
Minor style changes across the board. Changed an alias to an explicit
method declaration, since the alias will not be documented otherwise.
2015-01-23 14:51:59 -07:00
Bogdan Gusiev
2606fb3397 Extracted ActiveRecord::AttributeAssignment to ActiveModel::AttributesAssignment
Allows to use it for any object as an includable module.
2015-01-23 23:43:22 +02:00