1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activemodel/test/models
Jean Boussier eece095765 Allow to pass the method signature when defining attribute methods
This saves some array allocations from avoiding `*args`, as well
as makes the Method object `arity` and `parameters` correct.

e.g. before this patch, ArgumentError would be confusing:

```ruby
>> model.name_was(1)
ArgumentError: wrong number of arguments (given 2, expected 1)
```
2021-04-11 17:03:25 +02:00
..
account.rb
blog_post.rb
contact.rb These test model accessors are public methods 2020-10-27 12:13:32 +09:00
custom_reader.rb
helicopter.rb
person.rb
person_with_validator.rb Raise deprecation for calling [:f] = 'b' or [:f] << 'b' 2019-03-31 22:59:12 +08:00
reply.rb Raise deprecation for calling [:f] = 'b' or [:f] << 'b' 2019-03-31 22:59:12 +08:00
sheep.rb
topic.rb Allow to pass the method signature when defining attribute methods 2021-04-11 17:03:25 +02:00
track_back.rb
user.rb Refactor has_secure_password to extract dedicated attribute module 2019-04-05 01:55:00 +09:00
visitor.rb