ruby on rails - In HAML, syntax error, unexpected ')' not placed by me -


i rendering drop down list of options in haml following code:

  - @campaigns.each |campaign|     %tr{class: 'tr_' + cycle('odd', 'even'), id: "#{campaign.to_param}"}       %td= link_to campaign.name, campaign       %td= campaign.synopsis       %td= campaign.focus_area       %td= number_to_currency(campaign.goal_in_dollars)       %td= campaign.approval_requested_at //line 34       %td= link_to 'approve', approve_admin_campaign_path(campaign)//line 35       %td= form_tag({controller: "admin/campaign", action: "deny"}, method: "post") //line 36       = text_field_tag :reason, params[:reason] //line 37       = submit_tag("deny") //line 38 

however, i'm getting error:

/users/user/rails_projects/wdi/app/views/admin/campaigns/index.haml:34: syntax error, unexpected ')' ));}</td>\n      #{_hamlout.fo...  ^ /users/user/rails_projects/wdi/app/views/admin/campaigns/index.haml:36: unknown regexp options - tr /users/user/rails_projects/wdi/app/views/admin/campaigns/index.haml:36: syntax error, unexpected $undefined ));}\n    </tr>\n", -1, false);end;_hamlout.p...                 ^ /users/user/rails_projects/wdi/app/views/admin/campaigns/index.haml:39: unknown regexp options - dv /users/user/rails_projects/wdi/app/views/admin/campaigns/index.haml:39: syntax error, unexpected $undefined ...end;_hamlout.push_text("</div>\n", -1, false);::haml::util.h... ...                               ^ /users/user/rails_projects/wdi/app/views/admin/campaigns/index.haml:39: unterminated string meets end of file /users/user/rails_projects/wdi/app/views/admin/campaigns/index.haml:39: syntax error, unexpected $end, expecting keyword_end 

where error coming from? i'm not adding parenthesis or new line character

the form tag not indented. change to

%td   = form_tag({controller: "admin/campaign", action: "deny"}, method: "post") //line 36     = text_field_tag :reason, params[:reason] //line 37     = submit_tag("deny") 

Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -