On Jan 17, 2012, at 4:28 PM, JezC wrote:

> Thanks for the pointers of things to check.
> 
> On Jan 17, 8:22 pm, kevinpfromnm <[email protected]> wrote:
>> only things that come to mind are some small stuff: restart the web server,
>> make sure the migrations are up to date with hobo g migration, double check
>> your taglibs/views that there isn't a custom form defined
> 
> Web server not just restarted, but changed. This is development
> environment, so I kill and restart the server quite a lot. However, in
> pursuing another problem, I changed the server from webrick to
> unicorn. That solved a crash that I had with nested accessible models.
> Doesn't fix this, though.
> 
> MIgrations - Pretty much any time I change a model, I run "hobo g
> migration", just in case. Just done it again - still a problem.
> 
> Custom form modification was defined, though. I specified the fields I
> wanted to show - but I didn't have the submit button. I thought I was
> using a "form merge" to replace the fields, not the fields and the
> submit button.
> 
> I think the real problem is that I put the form modification in
> application.dryml - should I have put it in views/(model-name)/
> form.dryml to make it more obvious for maintenance?

It wouldn't get loaded from there, unfortunately, unless you included it 
somehow. application.dryml is the typical place that such things go.

There is one important gotcha to note, however, between a param tag and a 
regular tag. For instance, this:

<def tag="form" for="SomeModel">
  <form merge>
    <field-list fields="foo, bar, baz />
  </form>
</def>

will produce a form with fields foo, bar and baz but without a submit button, 
whereas this:

<def tag="form" for="SomeModel">
  <form merge>
    <field-list: fields="foo, bar, baz />
  </form>
</def>

will produce a form with fields foo, bar, and baz *and* the default submit 
button. Note the : after field-list.

In the first case, you're replacing the entire content of the form tag with 
what you're passing. In the latter, you're passing the field-list parameter to 
form leaving the remainder of the contents unchanged.

--Matt Jones

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to