Module: CableReady::ViewHelper
Instance Method Summary
collapse
-
#cable_car ⇒ Object
-
#cable_ready_stream_from(*keys, html_options: {}) ⇒ Object
-
#cable_ready_updates_for(*keys, url: nil, debounce: nil, only: nil, ignore_inner_updates: false, observe_appearance: false, html_options: {}, &block) ⇒ Object
-
#cable_ready_updates_for_if(condition, *keys, **options, &block) ⇒ Object
-
#stream_from ⇒ Object
-
#updates_for ⇒ Object
-
#updates_for_if ⇒ Object
#signed_stream_identifier, #verified_stream_identifier
#compound
Instance Method Details
#cable_car ⇒ Object
48
49
50
|
# File 'app/helpers/cable_ready/view_helper.rb', line 48
def cable_car
CableReady::CableCar.instance
end
|
#cable_ready_stream_from(*keys, html_options: {}) ⇒ Object
26
27
28
|
# File 'app/helpers/cable_ready/view_helper.rb', line 26
def cable_ready_stream_from(*keys, html_options: {})
tag.cable_ready_stream_from(**build_options(*keys, html_options))
end
|
#cable_ready_updates_for(*keys, url: nil, debounce: nil, only: nil, ignore_inner_updates: false, observe_appearance: false, html_options: {}, &block) ⇒ Object
30
31
32
33
34
35
36
37
38
|
# File 'app/helpers/cable_ready/view_helper.rb', line 30
def cable_ready_updates_for(*keys, url: nil, debounce: nil, only: nil, ignore_inner_updates: false, observe_appearance: false, html_options: {}, &block)
options = build_options(*keys, html_options)
options[:url] = url if url
options[:debounce] = debounce if debounce
options[:only] = only if only
options[:"ignore-inner-updates"] = "" if ignore_inner_updates
options[:"observe-appearance"] = "" if observe_appearance
tag.cable_ready_updates_for(**options) { capture(&block) }
end
|
#cable_ready_updates_for_if(condition, *keys, **options, &block) ⇒ Object
40
41
42
43
44
45
46
|
# File 'app/helpers/cable_ready/view_helper.rb', line 40
def cable_ready_updates_for_if(condition, *keys, **options, &block)
if condition
cable_ready_updates_for(*keys, **options, &block)
else
capture(&block)
end
end
|
#stream_from ⇒ Object
8
9
10
11
12
|
# File 'app/helpers/cable_ready/view_helper.rb', line 8
def stream_from(...)
warn "DEPRECATED: please use `cable_ready_stream_from` instead. The `stream_from` view helper will be removed from a future version of CableReady 5"
cable_ready_stream_from(...)
end
|
#updates_for ⇒ Object
14
15
16
17
18
|
# File 'app/helpers/cable_ready/view_helper.rb', line 14
def updates_for(...)
warn "DEPRECATED: please use `cable_ready_updates_for` instead. The `updates_for` view helper will be removed from a future version of CableReady 5"
cable_ready_updates_for(...)
end
|
#updates_for_if ⇒ Object
20
21
22
23
24
|
# File 'app/helpers/cable_ready/view_helper.rb', line 20
def updates_for_if(...)
warn "DEPRECATED: please use `cable_ready_updates_for_if` instead. The `updates_for_if` view helper will be removed from a future version of CableReady 5"
cable_ready_updates_for_if(...)
end
|