Module: ActiveAdmin::FriendlyIdDisabler
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/activeadmin/friendly_id_disabler.rb
Overview
This module disables FriendlyId for the duration of the specified action.
Instance Method Summary collapse
-
#disable_friendly_id(&action) ⇒ Object
Temporarily disables FriendlyId functionality within the given block.
Instance Method Details
#disable_friendly_id(&action) ⇒ Object
Note:
This method leverages a thread-local variable to manage the disabled state, ensuring that the disabling is scoped to the current thread only.
Temporarily disables FriendlyId functionality within the given block.
28 29 30 |
# File 'lib/activeadmin/friendly_id_disabler.rb', line 28 def disable_friendly_id(&action) ::FriendlyId::Disabler.disable_friendly_id(&action) end |