Skip to content

Commit

Permalink
Only include ReadAttribute module if AR version is 5.2 or higher
Browse files Browse the repository at this point in the history
  • Loading branch information
shioyama committed Nov 30, 2017
1 parent fe8c794 commit 2da5d17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mobility/plugins/active_record/dirty.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def included(model_class)
end
end
model_class.extend has_attribute
model_class.include ReadAttribute
model_class.include ReadAttribute if ::ActiveRecord::VERSION::STRING >= '5.2'
end

private
Expand Down

0 comments on commit 2da5d17

Please sign in to comment.