forked from fixin.me/fixin.me
Manage client-side js with turbo_stream actions
This commit is contained in:
@@ -1,9 +1,21 @@
|
||||
ActiveSupport.on_load :turbo_streams_tag_builder do
|
||||
def disable(target)
|
||||
action :disable, target
|
||||
action :disable, target, allow_inferred_rendering: false
|
||||
end
|
||||
|
||||
def disable_all(targets)
|
||||
action_all :disable, targets
|
||||
action_all :disable, targets, allow_inferred_rendering: false
|
||||
end
|
||||
|
||||
def enable(target)
|
||||
action :enable, target, allow_inferred_rendering: false
|
||||
end
|
||||
|
||||
def enable_all(targets)
|
||||
action_all :enable, targets, allow_inferred_rendering: false
|
||||
end
|
||||
|
||||
def focus(target)
|
||||
action :focus, target, allow_inferred_rendering: false
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user