Please sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the second argument to `attribute` optional
While working on updating Paper Trail for 5.1 compatibility, I noticed that I was required to pass a second argument to `attribute`. I didn't intend for this to be the case, as `attribute :foo` is totally reasonable shorthand for "I want `attr_accessor :foo`, but also have it work with things like `.attributes` and `ActiveRecord::Dirty`"
- Loading branch information
Showing with 15 additions and 1 deletion.