Forum: Ruby on Rails Action Controller Exception caught?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
untz786 (Guest)
on 2005-12-03 01:48
(Received via mailing list)
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
This topic is locked and can not be replied to.