lib/phlex/rails/helpers.rb in phlex-rails-0.5.0 vs lib/phlex/rails/helpers.rb in phlex-rails-0.5.1
- old
+ new
@@ -3,27 +3,27 @@
module Phlex
module Rails
module Helpers
module CSPMetaTag
def csp_meta_tag(...)
- if (output = @_view_context.csp_meta_tag(...))
+ if (output = helpers.csp_meta_tag(...))
@_target << output
end
end
end
module CSRFMetaTags
def csrf_meta_tags
- if (output = @_view_context.csrf_meta_tags)
+ if (output = helpers.csrf_meta_tags)
@_target << output
end
end
end
module ActionCableMetaTag
def action_cable_meta_tag
- if (output = @_view_context.action_cable_meta_tag)
+ if (output = helpers.action_cable_meta_tag)
@_target << output
end
end
end
@@ -65,11 +65,11 @@
alias_method :button, :__output_method__
alias_method :rich_text_area, :__output_method__
end
def form_with(*args, **kwargs, &block)
- @_target << @_view_context.form_with(*args, **kwargs) { |form|
+ @_target << helpers.form_with(*args, **kwargs) { |form|
capture do
yield(
BufferedFormWith.new(form, buffer: @_target)
)
end.html_safe
@@ -77,82 +77,82 @@
end
end
module StylesheetLinkTag
def stylesheet_link_tag(...)
- if (output = @_view_context.stylesheet_link_tag(...))
+ if (output = helpers.stylesheet_link_tag(...))
@_target << output
end
end
end
module FaviconLinkTag
def favicon_link_tag(...)
- if (output = @_view_context.favicon_link_tag(...))
+ if (output = helpers.favicon_link_tag(...))
@_target << output
end
end
end
module ImageTag
def image_tag(...)
- if (output = @_view_context.image_tag(...))
+ if (output = helpers.image_tag(...))
@_target << output
end
end
end
module AudioTag
def audio_tag(...)
- if (output = @_view_context.audio_tag(...))
+ if (output = helpers.audio_tag(...))
@_target << output
end
end
end
module VideoTag
def video_tag(...)
- if (output = @_view_context.video_tag(...))
+ if (output = helpers.video_tag(...))
@_target << output
end
end
end
module PreloadLinkTag
def preload_link_tag(...)
- if (output = @_view_context.preload_link_tag(...))
+ if (output = helpers.preload_link_tag(...))
@_target << output
end
end
end
module JavaScriptIncludeTag
def javascript_include_tag(...)
- if (output = @_view_context.javascript_include_tag(...))
+ if (output = helpers.javascript_include_tag(...))
@_target << output
end
end
end
module JavaScriptImportmapTags
def javascript_importmap_tags(...)
- if (output = @_view_context.javascript_importmap_tags(...))
+ if (output = helpers.javascript_importmap_tags(...))
@_target << output
end
end
end
module JavaScriptImportModuleTag
def javascript_import_module_tag(...)
- if (output = @_view_context.javascript_import_module_tag(...))
+ if (output = helpers.javascript_import_module_tag(...))
@_target << output
end
end
end
module ContentFor
def content_for(slot, &block)
- @_view_context.content_for(slot, capture(&block))
+ helpers.content_for(slot, capture(&block))
end
end
end
end
end