Hi Michael,

- I think "<search-form>" tag has an extra `for="Company"`. I don't
think this tag is polymorphic, what happens if you just do:
  <def tag="search-form">
    ...

- I'm not sure what the problem might be with the "undefined method
errors" message. Can you share a bigger piece of the error trace, to see
if I can take a look at what's causing it? Thanks!

Warm regards,
Ignacio

El 18/11/14 a las 03:19, Michael B escribió:
> Hello,
> 
> I'd like to have a search form with fields for each column on the index
> page.
> 
> I tried to play around with two approaches and got errors.
> 
> This is the call of the index-page tag for "companies".
> I have both variants of the call to a form in the code below.
> When I call my defined <search-form> it raises an exception that there
> is a missing search_form method.
> In the explicit form case, there is an undefined method 'errors'.
> 
> Any help appreciated!
> Regards,
> Michael Bonnet.
> 
> 
> 
> <index-page>
> 
>   <collection: replace>
>     <table-plus without-page-nav fields="this, address, city,  state, 
> zipcode, sic, description, actions"  without-search-form>
> 
>       <actions-view:><bootstrap-table-actions/></actions-view:>
> 
>       <!-- removes search filter from table-plus -->
>       <search-filter: replace></search-filter:>
> 
>     </table-plus>
>   </collection:>
> 
> 
>   <aside: replace>
> 
>     <!-- calling this there is an exception with missing *"search_form"* 
> method    -->
>     <search-form/>
> 
>     <!-- calling this there is an undefined method 'errors'  for 
> #<ActiveRecord::Relation::ActiveRecord_Relation_Company:0x007f7f59992d40>  -->
>     <form action="companies" method="GET">
>       <label for="search">Search by Name:</label><input type="text" 
> name="search_name" />
>       <field-list fields="name" >
>       </field-list>
>       <div name="action">
>         <submit label="Search"></submit>
>       </div>
>     </form>
>   </aside:>
> 
> </index-page>
> 
> 
> 
> 
> <def tag="search-form" for="Company">
> 
>   <form merge param="default" action="companies" method="GET">
>     <error-messages param/>
>     <field-list fields="name, address, city, state, zipcode, sic, 
> description" param/>
>     <div param="actions">
>       <submit label="Search" param/>
>     </div>
>   </form>
> 
> </def>
> 
> 
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Hobo Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected]
> <mailto:[email protected]>.
> To post to this group, send email to [email protected]
> <mailto:[email protected]>.
> Visit this group at http://groups.google.com/group/hobousers.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/hobousers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to