Skip to content

DeferredRender only appears to render the block #584

Answered by TheRealNeil
TheRealNeil asked this question in Help
Discussion options

You must be logged in to vote

t.name appears to be a Hash

0> t.inspect
=> "#<data TabsComponent::Tab name={:name=>\"tab1\"}, content=#<Proc:0x0000000113c2b460 /.../gems/phlex-rails-1.0.0/lib/phlex/rails/unbuffered_overrides.rb:11>>"

0> t.name
=> {:name=>"tab1"}

so

@tabs.each do |t|
  a { t.name[:name] }
end

worked and so did the string literal.

My bad, I had not changed the example name parameter to a named parameter but I called it as such 😞

def tab(name:, &content)
  @tabs << Tab.new(name:, content)
end

Thanks for the quick reply and prompt to debug.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@TheRealNeil
Comment options

Answer selected by joeldrapper
@joeldrapper
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants