[Ruby on Rails] Syntax Error

schleckerbeck

Erfahrenes Mitglied
Hi,

bin noch völliger Neuling in Ruby on Rails. Versuche mich gerade mit einem Buch an einem Beispiel, und bekomme jedoch immer einen syntax error.
Code:
compile error
C:/INSTAN~1.0-W/rails_apps/ontrack/app/views/iterations/edit.html.erb:12: syntax error, unexpected tIDENTIFIER, expecting ')'
_erbout.concat(( link_to "Back, :action => "index" ).to_s); _erbout
                                                 ^
C:/INSTAN~1.0-W/rails_apps/ontrack/app/views/iterations/edit.html.erb:12: unterminated string meets end of file
C:/INSTAN~1.0-W/rails_apps/ontrack/app/views/iterations/edit.html.erb:12: syntax error, unexpected $end, expecting ')'

Und hier der Code dazu:

Code:
<h1>Editing Iteration</h1>
  <% form_tag :action => "update_iteration", :id => @iteration do %>
    <p>Name: <%= text_field "iteration", "name" %></p>
  <p>Start Date:
    <%= date_select "iteration", "start_date" %></p>
  <p>End Date:
  <%= date_select "iteration", "end_date" %></p>

  <%= submit_tag "Update" %>
  <%= hidden_field "iteration", "project_id" %>
<% end -%>
<%= link_to "Back, :action => "index" %>

An was könnte das liegen? Hab die Syntax schon überprüft, finde leider keinen Fehler.

Danke,
sc.
 
Zurück