Skip to content
This repository has been archived by the owner on Oct 19, 2018. It is now read-only.

limitation in unparser makes Component() fail #10

Open
janbiedermann opened this issue Jan 20, 2018 · 0 comments
Open

limitation in unparser makes Component() fail #10

janbiedermann opened this issue Jan 20, 2018 · 0 comments

Comments

@janbiedermann
Copy link
Contributor

janbiedermann commented Jan 20, 2018

A limitation in unparser makes usual component calls without arguments fail in all blocks that are send to the client (evaluate_ruby, expect_evaluate_ruby, Mount, etc.), example:

          class Comp
            include Hyperloop::Component::Mixin
            def render
              "whatever"
            end
          end

          class SuperComp
            include Hyperloop::Component::Mixin
            def render
              Comp()
            end
          end

Workaround is simple, pass a silly arg:

          class Comp
            include Hyperloop::Component::Mixin
            param :silly
            def render
              "whatever"
            end
          end

          class SuperComp
            include Hyperloop::Component::Mixin
            def render
              Comp(silly: 'arg')
            end
          end
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant