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

more functions with sinatra #4

Closed devvit closed 6 years ago

devvit commented 6 years ago

Sir, as I saw, paper_trail now use request_store for context storage completely,

currently, paper_trail-sinatra only contains whodunnit,

I can add a few lines simply to get more functions:

#line 35
::PaperTrail.whodunnit = user_for_paper_trail if ::PaperTrail.enabled?
PaperTrail.enabled_for_controller = paper_trail_enabled_for_controller
PaperTrail.controller_info = info_for_paper_trail

Is it correct? request_store is thread-safe for rack app

thanks :)

jaredbeck commented 6 years ago

Hi @devvit I'd be happy to review two separate PR: one for controller_info and one for enabled_for_controller. Each PR should include documentation and tests. Thanks!

devvit commented 6 years ago

closed, PR created