On Feb 4, 2011, at 12:39 PM, François Beausoleil wrote:
> Hi!
>
> I have a real model with a serialized attribute. The model's a query
> builder, and the rules I use for the query are stored in the
> serialized field.
>
> When I hit /queries/new, I get a hidden field where the Hash's #to_s
> is the value:
>
> <input id="query_rules" name="query[rules]" type="hidden"
> value="tableandoperandsum(extension)tableeventsvalue100event_kind_id5campaign_id20operator>="
> /
>>
>
> How can I skip this? There's a hidden-fields on form, but when I add
> that, then I get a NoMethodError on #default on NilClass.
I swear I've answered this before, but the search may not be finding it. In any
case, there's a workaround for this. Add this to your form tag:
<do:query-rules><!-- keep the query_rules hash out of hidden-fields -->
<% param_name_for_this %>
</do>
There's a side-effect of calling param_name_for_this that basically tells Hobo,
"I've used this field on the form".
--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.