Remove defunct controller ivar
This commit is contained in:
parent
468c5cea48
commit
364e64a181
|
@ -13,7 +13,8 @@ recommendations of [keepachangelog.com](http://keepachangelog.com/).
|
|||
belongs_to_required_by_default will produce an error instead of a warning.
|
||||
- Failing to set PaperTrail.config.track_associations will no longer produce
|
||||
a warning. The default (false) will remain the same.
|
||||
- warn_about_not_setting_whodunnit controller method
|
||||
- The `warn_about_not_setting_whodunnit` controller method will be removed.
|
||||
Remove callbacks like `skip_after_action :warn_about_not_setting_whodunnit`.
|
||||
- [#997](https://github.com/airblade/paper_trail/pull/997) -
|
||||
where_object_changes reading YAML from a text column
|
||||
|
||||
|
|
|
@ -66,14 +66,17 @@ module PaperTrail
|
|||
|
||||
# Tells PaperTrail who is responsible for any changes that occur.
|
||||
def set_paper_trail_whodunnit
|
||||
@set_paper_trail_whodunnit_called = true
|
||||
::PaperTrail.whodunnit = user_for_paper_trail if ::PaperTrail.enabled_for_controller?
|
||||
if ::PaperTrail.enabled_for_controller?
|
||||
::PaperTrail.whodunnit = user_for_paper_trail
|
||||
end
|
||||
end
|
||||
|
||||
# Tells PaperTrail any information from the controller you want to store
|
||||
# alongside any changes that occur.
|
||||
def set_paper_trail_controller_info
|
||||
::PaperTrail.controller_info = info_for_paper_trail if ::PaperTrail.enabled_for_controller?
|
||||
if ::PaperTrail.enabled_for_controller?
|
||||
::PaperTrail.controller_info = info_for_paper_trail
|
||||
end
|
||||
end
|
||||
|
||||
# We have removed this warning. We no longer add it as a callback.
|
||||
|
|
Loading…
Reference in New Issue