Commit d5d116b
committed
Fix Rails 5.1 compatibility: Remove ActiveModel::Attributes
ActiveModel::Attributes is only available in Rails 5.2+. For Rails 5.1
compatibility, use attr_accessor instead.
Changes:
- Remove 'include ActiveModel::Attributes'
- Replace 'attribute :id, :integer' with 'attr_accessor :id'
- Add explicit initialize method
This ensures the test fixtures work with Rails 5.1.7 and above.1 parent 26aebdb commit d5d116b
1 file changed
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2695 | 2695 | | |
2696 | 2696 | | |
2697 | 2697 | | |
2698 | | - | |
2699 | 2698 | | |
2700 | | - | |
2701 | | - | |
2702 | | - | |
| 2699 | + | |
| 2700 | + | |
| 2701 | + | |
| 2702 | + | |
| 2703 | + | |
| 2704 | + | |
| 2705 | + | |
2703 | 2706 | | |
2704 | 2707 | | |
2705 | 2708 | | |
| |||
0 commit comments