Anyone know what''s wrong with this haml that it''s not displaying a chart (= @chart)? %table.body-layout %tr %td{:colspan => 2} .panel#students-chart %h3.header Students #pieChart.content - content_for :javascripts do = @chart %td .panel#activity-chart %h3.header Activity .content Thanks for any reply. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Thu, Apr 8, 2010 at 8:07 PM, John Merlino <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Anyone know what''s wrong with this haml that it''s not displaying a chart > (= @chart)? > > %table.body-layout > %tr > %td{:colspan => 2} > .panel#students-chart > %h3.header Students > #pieChart.content > - content_for :javascripts do > = @chart > %td > .panel#activity-chart > %h3.header Activity > .content > > Thanks for any reply. > --What kind of variable is @chart? -- Leonardo Mateo. There''s no place like ~ -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Leonardo Mateo wrote:> On Thu, Apr 8, 2010 at 8:07 PM, John Merlino <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> > wrote: >> � � � � � �= @chart >> � � � � � �%td >> � � � � � � �.panel#activity-chart >> � � � � � � � �%h3.header Activity >> � � � � � � � �.content >> >> Thanks for any reply. >> -- > > What kind of variable is @chart? > > > -- > Leonardo Mateo. > There''s no place like ~If I do this, it renders chart as text: %h3.header Students #chart-container - content_for :javascripts do = @chart %td I had this problem before and it was related to indentation and haml. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Fri, Apr 9, 2010 at 10:42 AM, John Merlino <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Leonardo Mateo wrote: >> On Thu, Apr 8, 2010 at 8:07 PM, John Merlino <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> >> wrote: >>> � � � � � �= @chart >>> � � � � � �%td >>> � � � � � � �.panel#activity-chart >>> � � � � � � � �%h3.header Activity >>> � � � � � � � �.content >>> >>> Thanks for any reply. >>> -- >> >> What kind of variable is @chart? >> >> >> -- >> Leonardo Mateo. >> There''s no place like ~ > > > > If I do this, it renders chart as text:Ok, and what do you have stored in @chart? I mean, what type should it be?> > %h3.header Students > #chart-container > - content_for :javascripts do > = @chart > %td > > I had this problem before and it was related to indentation and haml.Weird, haml is pretty strict with indentation, a mistake will raise a complie exception. I''m pretty sure you''re not showing the data the way you should -- Leonardo Mateo. There''s no place like ~ -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Apr 9, 2010, at 6:50 AM, Leonardo Mateo wrote:> > On Fri, Apr 9, 2010 at 10:42 AM, John Merlino <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >> Leonardo Mateo wrote: >>> On Thu, Apr 8, 2010 at 8:07 PM, John Merlino <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> >>> wrote: >>>> � � � � � �= @chart >>>> � � � � � �%td >>>> � � � � � � �.panel#activity-chart >>>> � � � � � � � �%h3.header Activity >>>> � � � � � � � �.content >>>> >>>> Thanks for any reply. >>>> -- >>> >>> What kind of variable is @chart? >>> >>> >>> -- >>> Leonardo Mateo. >>> There''s no place like ~ >> >> >> >> If I do this, it renders chart as text: > Ok, and what do you have stored in @chart? I mean, what type should it be? > >> >> %h3.header Students >> #chart-container >> - content_for :javascripts do >> = @chart >> %td >> >> I had this problem before and it was related to indentation and haml. > Weird, haml is pretty strict with indentation, a mistake will raise a > complie exception. I''m pretty sure you''re not showing the data the way > you shouldThe question about what kind of variable @chart is will be crucial in getting you any help. Also, it appears you might have intended = @chart to be indented beneath the content_for block, but it isn''t. You might want to join the haml mailing list on Google Groups for quick answers: http://groups.google.com/group/haml?hl=en HTH -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.