aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/attribute_assignment.rb
Commit message (Collapse)AuthorAgeFilesLines
* Improve error message when assign wrong attributes to modelSemyon Pupkov2018-04-281-1/+1
|
* Alias `assign_attributes` to `attributes=` for `AttributeAssignment`Ryuta Kamizono2018-02-281-0/+2
| | | | There is no reason `attributes=` doesn't take `assign_attributes`.
* add frozen string literal commentshotat2017-06-151-1/+3
|
* freeze stringshotat2017-06-141-1/+1
|
* enhance active model assignmentshotat2017-06-141-2/+3
|
* Docs: Fix output representation [ci skip]Viktor Fonic2017-05-311-2/+2
| | | The output of two string attributes is displayed differently in the docs. Standardize the output by always showing it as a comment.
* No need to check nilTsukuru Tanimichi2017-04-021-1/+1
| | | | | | | | | | ```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. ```
* normalizes indentation and whitespace across the projectXavier Noria2016-08-061-10/+10
|
* applies new string literal convention in activemodel/libXavier Noria2016-08-061-1/+1
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Update and fix forbidden attributes testsThomas Walpole2015-11-031-1/+1
| | | | Add AC::Parameters tests for WhereChain#not
* Follow-up to #10776Robin Dupret2015-02-261-11/+0
| | | | | | | | | | 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.
* ✂️ and 💅 for #10776Sean Griffin2015-01-231-3/+2
| | | | | Minor style changes across the board. Changed an alias to an explicit method declaration, since the alias will not be documented otherwise.
* Extracted `ActiveRecord::AttributeAssignment` to ↵Bogdan Gusiev2015-01-231-0/+64
`ActiveModel::AttributesAssignment` Allows to use it for any object as an includable module.