Closed chrisdrappier closed 5 years ago
@chrisdrappier Sorry for the delayed response. I'll look into adding this in.
@chrisdrappier thanks for the note! Attr_accessible was deprecated in Rails 4 and beyond, so actually the statement could read version <= 3. But since this gem never supported Rails versions below 3, I don't think it's worthwhile to change that.
Actually, the real answer is that version should have been an attr_accessor. That was just lazy on my part, so I plan to remove that in an upcoming release.
Interestingly, this attribute was part of ActiveRecord::Base in Rails 2, then moved to ActiveModel::MassAssignmentSecurity::ClassMethods in Rails 3, before being removed completely in Rails 4 and going forward.
https://github.com/theSteveMitchell/after_party/blob/3c911207101277f9166bb3d497b24a853b2f8c54/lib/after_party/models/active_record/task_record.rb
should
if ::Rails::VERSION::MAJOR.to_i == 3
beif ::Rails::VERSION::MAJOR.to_i >= 3
instead? i can put in a PR for this if you think it's a reasonable change.