You have this line:
:confirm => ''Do you really want to quit?"
The quotes don''t match, causing mayhem to ensue.
-----Original Message-----
From: untz [mailto:untz786-/E1597aS9LQAvxtiuMwx3w@public.gmane.org]
Sent: Friday, December 02, 2005 3:46 PM
To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
Subject: [Rails] Action Controller Exception caught?
Hello,
I just modified a ERb view template and I get the following error:
------------------------------------------------------------------------
-------------
SyntaxError in Admin#list
Showing app/views/admin/list.rhtml where line #36 raised:
compile error
script/../config/../app/views/admin/list.rhtml:36: syntax error
_erbout.concat(( link_to ''New album'', :action =>
''new'').to_s);
_erbout.concat "\n"
^
script/../config/../app/views/admin/list.rhtml:36: syntax error
_erbout.concat(( link_to ''New album'', :action =>
''new'').to_s);
_erbout.concat "\n"
^
script/../config/../app/views/admin/list.rhtml:36: unterminated
string meets end of file
script/../config/../app/views/admin/list.rhtml:36: syntax error
Extracted source (around line #36):
33: end %>
34:
35: <br />
36: <%= link_to ''New album'', :action =>
''new''%>
Trace of template inclusion: /app/views/admin/list.rhtml
------------------------------------------------------------------------
-------------
This is my source:
<center><h1>Album Listing</h1></center>
<table cellpadding="5" cellspacing="0">
<%
odd_or_even = 0
for album in @albums
odd_or_even = 1 - odd_or_even
%>
<tr valign="top" class="ListLine<%= odd_or_even
%>">
<td>
<span class="ListTitle"><%= h(album.title)
%></span><br
/>
<%= h(truncate(album.artist_name, 50)) %>
</td>
<td>
<%= album.genre %>
</td>
<td class="ListActions">
<%= link_to ''Show'', :action =>
''show'', :id => album %>
<br />
<%= link_to ''Edit'', :action =>
''edit'', :id => album %>
<br />
<%= link_to ''Destroy'', { :action =>
''destroy'', :id =>
album },
:confirm => ''Do you really want
to quit?" %>
</td>
</tr>
<% end %>
</table>
<%= if @album_pages.current.previous
link_to("Previous" , { :page =>
@album_pages.current.previous })
end %>
<%= if @album_pages.current.next
link_to("Next", { :page => @album_pages.current.next})
end %>
<br />
<%= link_to ''New album'', :action =>
''new''%>
------------------------------------------------------------------------
-------------
What am I doing wrong?
Many, many thanks!
Unnsse
_______________________________________________
Rails mailing list
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails