I get an undefined method month: xml.haml: - @results.each do |result| %set{:month => "#{result.month}", :value => result.month} Any suggestions? -- 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.
John Merlino wrote:> I get an undefined method month: > > xml.haml: > - @results.each do |result| > %set{:month => "#{result.month}", :value => result.month} > > Any suggestions?Actually I figured out why it was returning undefined. But with this - @results.each do |result| %set{:value1 => "#{result.month}"}, {:value2 => "#{result.month}"} My output shows empty values. -- 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.
John Merlino wrote:> John Merlino wrote: >> I get an undefined method month: >> >> xml.haml: >> - @results.each do |result| >> %set{:month => "#{result.month}", :value => result.month} >> >> Any suggestions? > > Actually I figured out why it was returning undefined. But with this > - @results.each do |result| > %set{:value1 => "#{result.month}"}, {:value2 => "#{result.month}"} > > My output shows empty values.Ok I fixed that problem as well. However, it''s not displaying the total number of results by month though. I have more records than what are being showed when output. -- 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.
Reasonably Related Threads
- undefined method join for STRING error
- acts_as_taggable, undefined method 'empty?'
- Strange Error undefined method `show' for # see no way to debug, suggestions?
- undefined method `gsub!' for 2012-01-22 17:00:00 -0500..2012-01-23 00:00:00 -0500:Chronic::Span
- undefined method?