Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify deferred mode via method #800

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion lib/phlex.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ module Phlex
autoload :CSV, "phlex/csv"
autoload :Callable, "phlex/callable"
autoload :Context, "phlex/context"
autoload :DeferredRender, "phlex/deferred_render"
autoload :DoubleRenderError, "phlex/errors/double_render_error"
autoload :Elements, "phlex/elements"
autoload :Error, "phlex/error"
Expand Down
5 changes: 0 additions & 5 deletions lib/phlex/deferred_render.rb

This file was deleted.

6 changes: 5 additions & 1 deletion lib/phlex/sgml.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def call(buffer = +"", context: Phlex::Context.new, view_context: nil, parent: n
@_context.around_render do
around_template do
if block
if Phlex::DeferredRender === self
if deferred?
vanish(self, &block)
view_template
else
Expand All @@ -118,6 +118,10 @@ def call(buffer = +"", context: Phlex::Context.new, view_context: nil, parent: n
end
end

def deferred?
false
end

def context
@_context.user_context
end
Expand Down