paper-trail-gem / paper_trail-sinatra

Optional. Provides access to PaperTrail controller methods, like whodunnit
GNU General Public License v3.0
4 stars 9 forks source link

Drop activesupport dependency #11

Closed azgul closed 4 years ago

azgul commented 4 years ago

Switch to safe navigation operator

Allows for dropping the activesupport dependency. paper_trail 10+ supports activerecord < 6.1. The activesupport < 6 dependency of paper_trail-sinatra artificially hinders the use of activerecord 6.0

As ruby < 2.3 support was dropped a while ago, the safe navigation operator can be adopted safely.

jaredbeck commented 4 years ago

LGTM, thanks. Please add an entry to the changelog under Unreleased -> Fixed.

azgul commented 4 years ago

Done. Also added the fallback behavior back for when current_user#id does not exist. Somehow didn't get that pushed yesterday. 😅