You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This was my own fault and had nothing to do with this gem. But the result is that my Rails app crashed and that I got a undefined method 'split' for nil:NilClass error that took me too long to track down This was of course a case of GIGO but still it would be nice if this gem would not produce an obscure error message.
In my fork I implemented a simple solution that silently ignores the result of the parent and only returns the children. This makes for a more forgiving gem, which I would prefer. Disadvantage here is that you might end up with unreachable translations in your db as soon as you turn a child node into a parent node.
Another approach would be to raise a specific error revealing the cause of the problem.
I'll submit a PR with my fix, but if a different solution is preferred I can have a look at it as well.
The text was updated successfully, but these errors were encountered:
In my db I had the following two keys with a value:
This was my own fault and had nothing to do with this gem. But the result is that my Rails app crashed and that I got a
undefined method 'split' for nil:NilClass
error that took me too long to track down This was of course a case of GIGO but still it would be nice if this gem would not produce an obscure error message.In my fork I implemented a simple solution that silently ignores the result of the parent and only returns the children. This makes for a more forgiving gem, which I would prefer. Disadvantage here is that you might end up with unreachable translations in your db as soon as you turn a child node into a parent node.
Another approach would be to raise a specific error revealing the cause of the problem.
I'll submit a PR with my fix, but if a different solution is preferred I can have a look at it as well.
The text was updated successfully, but these errors were encountered: