I am trying to do this inside a view template (pass 3 values, facility.id, @inc_beg_date and @inc_end_date)... <% for incident in IncidentReport.include facility.id @inc_beg_date @inc_end_date %> and the error I get is compile error script/../config/../app/views/reports/facilities/incident_report.rhtml:39: syntax error, unexpected tIVAR, expecting kDO_COND or '':'' or ''\n'' or '';'' for incident in IncidentReport.include facility.id @inc_beg_date @inc_end_date ; _erbout.concat "\n" ^ script/../config/../app/views/reports/facilities/incident_report.rhtml:65: syntax error, unexpected kEND, expecting $end and if I put commas in to separate the values, like this, <% for incident in IncidentReport.include facility.id, @inc_beg_date, @inc_end_date %> I get script/../config/../app/models/incident_report.rb:16: syntax error, unexpected $end, expecting kEND and if I enclose in parens the errors are the same How do I pass 3 values from within view code (because I can pass 1 value no problem) Craig --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Get freelance or telecom-job here!! http://freelance.telecom.googlepages.com On Oct 22, 2:01 am, Craig White <craigwh...-BQ75lA0ptkhBDgjK7y7TUQ@public.gmane.org> wrote:> I am trying to do this inside a view template (pass 3 values, > facility.id, @inc_beg_date and @inc_end_date)... > > <% for incident in IncidentReport.include facility.id @inc_beg_date > @inc_end_date %> > > and the error I get is > compile error > script/../config/../app/views/reports/facilities/incident_report.rhtml:39: syntax error, unexpected tIVAR, expecting kDO_COND or '':'' or ''\n'' or '';'' > for incident in IncidentReport.include facility.id @inc_beg_date @inc_end_date ; _erbout.concat "\n" > ^ > script/../config/../app/views/reports/facilities/incident_report.rhtml:65: syntax error, unexpected kEND, expecting $end > > and if I put commas in to separate the values, like this, > <% for incident in IncidentReport.include facility.id, @inc_beg_date, @inc_end_date %> > I get > script/../config/../app/models/incident_report.rb:16: syntax error, unexpected $end, expecting kEND > > and if I enclose in parens the errors are the same > > How do I pass 3 values from within view code (because I can pass 1 value > no problem) > > Craig--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Craig-- I didn''t see a reply to your question. What is the type of IncidentReport and what are you trying to do with the resultant values? On Oct 21, 2006, at 11:01 AM, Craig White wrote:> > I am trying to do this inside a view template (pass 3 values, > facility.id, @inc_beg_date and @inc_end_date)... > > <% for incident in IncidentReport.include facility.id @inc_beg_date > @inc_end_date %> > > and the error I get is > compile error > script/../config/../app/views/reports/facilities/ > incident_report.rhtml:39: syntax error, unexpected tIVAR, expecting > kDO_COND or '':'' or ''\n'' or '';'' > for incident in IncidentReport.include facility.id @inc_beg_date > @inc_end_date ; _erbout.concat "\n" > > ^ > script/../config/../app/views/reports/facilities/ > incident_report.rhtml:65: syntax error, unexpected kEND, expecting > $end > > and if I put commas in to separate the values, like this, > <% for incident in IncidentReport.include facility.id, > @inc_beg_date, @inc_end_date %> > I get > script/../config/../app/models/incident_report.rb:16: syntax error, > unexpected $end, expecting kEND > > and if I enclose in parens the errors are the same > > How do I pass 3 values from within view code (because I can pass 1 > value > no problem) > > Craig > > > > >--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Steve thanks - I actually figured it out - it drove me crazy and I had to walk away from it. For completeness, there were 2 problems so that everything I tried wouldn''t work until I examined each and every error message and it turned out there was a syntax error in my model which was receiving this call and the error message was so similar, it evaded detection for quite some time. Had I looked closely enough at the 2 errors that I had included...the second one specifically referred to app/models/incident_report.rb which was different from app/reports/facilities/incident_report.rb ;-( Ultimately, the 3 values passed exactly as I had tried it (required commas) <% for incident in IncidentReport.include facility.id, @inc_beg_date, @inc_end_date %> As RoseAnn Rosannadanna says...it''s always sumthin'' Craig On Sun, 2006-10-22 at 16:24 -0700, s.ross wrote:> Craig-- > > I didn''t see a reply to your question. What is the type of > IncidentReport and what are you trying to do with the resultant values? > > > > On Oct 21, 2006, at 11:01 AM, Craig White wrote: > > > > > I am trying to do this inside a view template (pass 3 values, > > facility.id, @inc_beg_date and @inc_end_date)... > > > > <% for incident in IncidentReport.include facility.id @inc_beg_date > > @inc_end_date %> > > > > and the error I get is > > compile error > > script/../config/../app/views/reports/facilities/ > > incident_report.rhtml:39: syntax error, unexpected tIVAR, expecting > > kDO_COND or '':'' or ''\n'' or '';'' > > for incident in IncidentReport.include facility.id @inc_beg_date > > @inc_end_date ; _erbout.concat "\n" > > > > ^ > > script/../config/../app/views/reports/facilities/ > > incident_report.rhtml:65: syntax error, unexpected kEND, expecting > > $end > > > > and if I put commas in to separate the values, like this, > > <% for incident in IncidentReport.include facility.id, > > @inc_beg_date, @inc_end_date %> > > I get > > script/../config/../app/models/incident_report.rb:16: syntax error, > > unexpected $end, expecting kEND > > > > and if I enclose in parens the errors are the same > > > > How do I pass 3 values from within view code (because I can pass 1 > > value > > no problem) > > > > Craig--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---