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
The form now renders (yay) but doesn't look quite right since the body tag doesn't have an edit class due to a different action name. This would be resolved by not nesting CSS as mentioned in #174.
When I submit the form I get this error:
NameError - undefined local variable or method `form' for #<#<Class:0x00007fc934466f18>:0x00007fc93bfdb068>
Did you mean? fork:
app/views/support_admin/accounts/_datetime.html.erb:1:in `_app_views_support_admin_accounts__datetime_html_erb__554914958012286755_70251162594040'
The logs show the update action worked and redirected to the show action which resulted in this error. It appears the custom datetime partial I added is being used by the show action but does not have a form variable. It is confusing to have two partials with the same name that have different behavior and locals. I suggest renaming the the form partials to datetime_field and moving them out of the form directory. Flat lists with unique names are good for customizability.
I moved the partial to accounts/extend_trial/datetime which resolves the error and renders the page.
Overall this was quite difficult to figure out. I suggest smoothing out this process and adding some documentation for customizing Wallaby in this way.
The text was updated successfully, but these errors were encountered:
I'm attempting to add an
extend_trial
action toAccountsController
. I added a route:And the controller action which has the same behavior as the edit action:
And then I copied the edit view to
extend_trial.html.erb
with one field:This produced the following error:
It took some digging to realize there's a
form_metadata_of
method which I assume is the behavior I want so I aliased it:Then I get this error:
So I add a partial at
accounts/_datetime.html.erb
which delegates to the internal date time partial:The form now renders (yay) but doesn't look quite right since the body tag doesn't have an
edit
class due to a different action name. This would be resolved by not nesting CSS as mentioned in #174.When I submit the form I get this error:
The logs show the update action worked and redirected to the show action which resulted in this error. It appears the custom datetime partial I added is being used by the
show
action but does not have a form variable. It is confusing to have two partials with the same name that have different behavior and locals. I suggest renaming the the form partials todatetime_field
and moving them out of theform
directory. Flat lists with unique names are good for customizability.I moved the partial to
accounts/extend_trial/datetime
which resolves the error and renders the page.Overall this was quite difficult to figure out. I suggest smoothing out this process and adding some documentation for customizing Wallaby in this way.
The text was updated successfully, but these errors were encountered: