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 Use frozen string literal in activemodel/ 2017-07-16 20:11:16 +03:00
blog_post.rb Use frozen string literal in activemodel/ 2017-07-16 20:11:16 +03:00
contact.rb These test model accessors are public methods 2020-10-27 12:13:32 +09:00
custom_reader.rb Use frozen string literal in activemodel/ 2017-07-16 20:11:16 +03:00
helicopter.rb Use frozen string literal in activemodel/ 2017-07-16 20:11:16 +03:00
person.rb Add cases to test combining validation conditions 2017-11-06 23:07:51 +00:00
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 Use frozen string literal in activemodel/ 2017-07-16 20:11:16 +03:00
topic.rb Allow to pass the method signature when defining attribute methods 2021-04-11 17:03:25 +02:00
track_back.rb Use frozen string literal in activemodel/ 2017-07-16 20:11:16 +03:00
user.rb Refactor has_secure_password to extract dedicated attribute module 2019-04-05 01:55:00 +09:00
visitor.rb Fix Ruby warnings tickled by the test suite 2018-06-30 10:20:45 +02:00