I can reproduce this behaviour in our work app but I can't reproduce in a minimal app which isn't very helpful.
The snippet causing issues:
class Todo < ApplicationRecord
phony_normalize :title, default_country_code: "GB" # actually missing
def self.foo # error
"foo"
end
end
And then Todo.foo in a component.
The phony_normalize method isn't available on the front end (fine) but the error I actually get is RuntimeError: Todo.foo (called class method missing). Which is unhelpful in tracking down what's actually wrong.
But as I said I can't reproduce, sorryi; when I try in a minimal app I do get the error pointing to phony_normalize. I don't know how Opal would be able to partially compile the class in some cases even though it can't find bits. Or could hyper-mesh be doing something odd?
Todo: test again when Hyperloop works with Opal 0.11 as that might fix it
I can reproduce this behaviour in our work app but I can't reproduce in a minimal app which isn't very helpful.
The snippet causing issues:
And then
Todo.foo
in a component.The
phony_normalize
method isn't available on the front end (fine) but the error I actually get isRuntimeError: Todo.foo (called class method missing)
. Which is unhelpful in tracking down what's actually wrong.But as I said I can't reproduce, sorryi; when I try in a minimal app I do get the error pointing to
phony_normalize
. I don't know how Opal would be able to partially compile the class in some cases even though it can't find bits. Or could hyper-mesh be doing something odd?Todo: test again when Hyperloop works with Opal 0.11 as that might fix it