Method in views (confusing example)
sovetnik opened this issue · 4 comments
sovetnik commented
Given example maybe should be replaced by another one, not bound to form, because passing wrong params cause error
Add a book#test_0002_displays list of errors when params contains errors:
NameError: undefined local variable or method `form' for #<Hanami::View::Rendering::Scope:0x007fe0fa942e00>
Did you mean? fork
Error happens because template is rendering from Web::Views::Books::Create instead Web::Views::Books::New and Create view don't have form method
And this may be confusing, especially when passing tutorial in first time.
davydovanton commented
@sovetnik hey, are you sure that your link is right? I don't see any problems in this form (https://github.com/hanami/hanami.github.io/blob/build/source/guides/helpers/forms.md#method-in-views) method
davydovanton commented
@sovetnik any updates? :)
sovetnik commented
No ;)
AlfonsoUceda commented
Closing this issue, it seems stale.