Chris, I'm not sure exactly what's up with yours, but it throws a 
compiler error even when you just evaluate the attributes hash in IRB:

irb(main):001:0> {:href=> "javascript:void(0)", 
:onclick=>"event_toggle_occurrences(#{event.id, url_for(:action => 
'occurrences', :id => event)});", :title=>"Click to view all occurrences"}
(irb):1: warning: parenthesize argument(s) for future version
(irb):1: warning: parenthesize argument(s) for future version
(irb):1: warning: parenthesize argument(s) for future version
(irb):1: warning: parenthesize argument(s) for future version
SyntaxError: compile error
(irb):1: syntax error, unexpected '}', expecting tCOLON2 or '[' or '.'
{:href=> "javascript:void(0)", 
:onclick=>"event_toggle_occurrences(#{event.id, url_for(:action => 
'occurrences', :id => event)});", :title=>"Click to view all occurrences"}
                                                                                
                                               
^
(irb):1: syntax error, unexpected tCONSTANT, expecting '}'
{:href=> "javascript:void(0)", 
:onclick=>"event_toggle_occurrences(#{event.id, url_for(:action => 
'occurrences', :id => event)});", :title=>"Click to view all occurrences"}
                                                                                
                                                                  
^
(irb):1: unterminated string meets end of file
(irb):1: syntax error, unexpected $end, expecting '}'
        from (irb):1
        from :0

Steve, I'm still looking into whatever caused your bug.

- Nathan

Genevate wrote:
> I'm having the saem issue trying to do somehting very similar.
>
> %a{:href=>
> "javascript:void(0)", :onclick=>"event_toggle_occurrences(#{event.id,
> url_for(:action => "occurrences", :id => event)});", :title=>"Click to
> view all occurrences"}
>
> Any luck with this?
>
> Chris-
>
>
> On Mar 9, 3:53 pm, "s.ross" <[EMAIL PROTECTED]> wrote:
>   
>> The error message is:
>>
>> (eval):43:in `compile': compile error
>> (eval):34: parse error, unexpected '=', expecting ')'
>> _hamlout.open_tag("td", 1, nil, false, "", {:class => @row_class}=  
>> check_box_tag :approved, 1, post_list_row.approved, {:onclick => "new  
>> Ajax.Request('#{url_for(:controller => 'posts', :action =>  
>> 'toggle_approved', :id => post_list_row[:id])}')"}, nil, false)
>>                                                                    ^
>> (eval):34: parse error, unexpected ')', expecting kEND
>>
>> Extracted source (around line #12):
>>
>> 9:   %td{:class => @row_class}
>> 10:     = post_list_row.posted_by
>> 11:   %td{:class => @row_class}= check_box_tag :approved, 1,  
>> post_list_row.approved, {:onclick => "new Ajax.Request('#{url_for
>> (:controller => 'posts', :action => 'toggle_approved', :id =>  
>> post_list_row[:id])}')"}
>> 12:   %td{:class => @row_class}= link_to(pluralize
>> (post_list_row.comments.count(:conditions => 'approved = 0'),  
>> 'comment'), :controller => 'comments', :action => 'list')
>>
>> Strange, huh?
>>
>> Steve
>>
>> On Mar 9, 2007, at 10:42 AM, Nathan Weizenbaum wrote:
>>
>>
>>
>>     
>>> I don't think it should be failing... what happens?
>>>       
>>> - Nathan
>>>       
>>> s.ross wrote:
>>>       
>>>> I have a case where this works:
>>>>         
>>>> %td{:class => @row_class}
>>>>    = check_box_tag :approved, 1, post_list_row.approved, {:onclick =>
>>>> "new Ajax.Request('#{url_for(:controller => 'posts', :action =>
>>>> 'toggle_approved', :id => post_list_row[:id])}')"}
>>>>         
>>>> But this fails:
>>>>         
>>>> %td{:class => @row_class}= check_box_tag :approved, 1,
>>>> post_list_row.approved, {:onclick => "new Ajax.Request('#{url_for
>>>> (:controller => 'posts', :action => 'toggle_approved', :id =>
>>>> post_list_row[:id])}')"}
>>>>         
>>>> I prefer the latter construct. Any reason it might be failing that
>>>> I'm not seeing?
>>>>         
>>>> Thanks,
>>>>         
>>>> Steve
>>>>         
>
>
> >
>
>   


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Haml" 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/haml?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to