I've managed to get it working.  The problems all stemmed from the order
that Hobo was issuing some tags.  Basically, the ajaxful_rating readme says
to add <%= ajaxful_rating_style %> to your layout.  Since Hobo doesn't
really have layouts per-se, I tried adding it to the stylesheets section of
<page>.  You are then supposed to add the call to ratings_for in your view.

In rails, the view tag is called before the ajaxful_rating_style is (I'm not
sure why, it seems kinda odd to me).  But in Hobo, the ajaxful_rating_style
tag is called first.  This is problematic because it is the view tag that
actually generates the inline css to make everything work; thus it was
adding a blank set of styles, then generating the styles later on but never
adding them to the page.

My hacky solution was simply this:

<show-page>
<append-body:>
<%= ratings_for @book, @current_user, :dimension => :speed %>
</append-body:>
<after-body:>
<%= ajaxful_rating_style %>
</after-body:>
</show-page>

I think putting the ajaxful_rating_style anywhere after the DOM location of
the ratings_for call will make it work.

I'd love to hear back from other users as to whether this seems like a Hobo
bug or not.

On Fri, May 14, 2010 at 9:24 AM, Owen Dall <[email protected]> wrote:

> Tom Locke did this a long time ago for a client demo, if my memory is
> correct.  This would be a great recipe to share if we can track it down!
>
> -Owen
>
>
>
> On Thu, May 13, 2010 at 12:47 PM, Chris Apolzon <[email protected]> wrote:
>
>> Has anyone managed to wrangle ajaxful rating into a Hobo site?  I've
>> taken a couple stabs at it, but have come up mostly empty.  Last night
>> I tracked down the first issue, which is that the px width is not
>> being set on the UL holding the stars, but it seems like there's also
>> some javascript issue.
>>
>> I'm going to keep hacking on this and hopefully come up with a
>> solution, but if anyone has any ideas or prior experience, I'd love a
>> pointer in the right direction.
>>
>> (For what its worth, when I was debugging, it looked like the width
>> was calculated properly and added to the CSS builder but it never
>> makes it onto the page.  Even if you remove all other stylesheets that
>> style is overwritten or disallowed somewhere in Hobo).
>>
>> Thanks!
>>
>> --
>> 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]<hobousers%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/hobousers?hl=en.
>>
>>
>
>
> --
> Thanks,
> - Owen
>
> Owen Dall, Chief Systems Architect
> Barquin International
> Cell: 410-991-0811
>
>  --
> 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]<hobousers%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/hobousers?hl=en.
>

-- 
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