This inspired me to tinker around with the autocomplete problem I
recently described in a Hobo Cookbook question, even though I know
just enough Ruby and Hobo to be dangerous.  I found I could get
autocomplete working in "New" pages by changing the <name-one> tag in
rapid_forms.dryml to what follows.  However, I can't really explain
why this works, and it may cause other problems.  The lines I added or
changed are the ones with the variable 't'.

<def tag="name-one" attrs="complete-target, completer"><%
  complete_target ||= this_field_reflection.klass
  completer ||= (complete_target.is_a?(Class) ? complete_target :
complete_target.class).name_attribute
  t = typed_id(complete_target)
  t = complete_target.class.to_s.strip if t == 'this'
%>
  <input type="text" name="#{param_name_for_this}"
         class="autocompleter #{type_and_field.dasherize} #
{css_data :complete_on, t, completer}"
         value="&name :no_wrapper => true, :if_present => true"
         merge-attrs/>
  <div class="completions-popup" style="display:none"></div>
</def>


On Nov 25, 3:50 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> I don't know if this is the right place to post this, so please tell
> me if there is a better place, but I fixed the autocompletion on edge
> by changing hobo/lib/hobo/controller.rb:83 to be:
>
> renderer = Hobo::Dryml.page_renderer(@template, [], page_path,
> @template.finder.pick_template(page_path, "dryml")) if page_path
>
> -Seth
--~--~---------~--~----~------------~-------~--~----~
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