Use hash rocket hash construction syntax in PostWithStatus model to avoid failures testing against Ruby18
This commit is contained in:
parent
d60763215d
commit
f3e134c04e
|
@ -2,7 +2,7 @@
|
|||
|
||||
- [#384](https://github.com/airblade/paper_trail/issues/384) - Fix `VersionConcern#originator` instance method.
|
||||
- [#383](https://github.com/airblade/paper_trail/pull/383) - Make gem compatible with `ActiveRecord::Enum` (available in `ActiveRecord` 4.1+).
|
||||
- [#373](https://github.com/airblade/paper_trail/pull/373) - Fix default sort order for the `versions` association in Rails `4.1`.
|
||||
- [#373](https://github.com/airblade/paper_trail/pull/373) - Fix default sort order for the `versions` association in `ActiveRecord` 4.1.
|
||||
- [#372](https://github.com/airblade/paper_trail/pull/372) - Use [Arel](https://github.com/rails/arel) for SQL construction.
|
||||
- [#347](https://github.com/airblade/paper_trail/pull/347) - Autoload `ActiveRecord` models in via a `Rails::Engine` when
|
||||
the gem is used with `Rails`.
|
||||
|
|
|
@ -3,6 +3,6 @@ class PostWithStatus < ActiveRecord::Base
|
|||
|
||||
# ActiveRecord::Enum is only supported in AR4.1+
|
||||
if defined?(ActiveRecord::Enum)
|
||||
enum status: { draft: 0, published: 1, archived: 2 }
|
||||
enum :status => { :draft => 0, :published => 1, :archived => 2 }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue