Forum: Ruby on Rails SyntaxError in Posts#index

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Ec8b325dcad37dee7a0c358811353a80?d=identicon&s=25 wragen22 (Guest)
on 2012-11-01 02:46
(Received via mailing list)
getting this error

compile error
/Users/bradwrage/webapps/blog/app/views/posts/index.html.erb:5: syntax
error, unexpected '='
...w Goal", new_post_path, class="btn btn-success" );@output_bu...
/Users/bradwrage/webapps/blog/app/views/posts/index.html.erb:7: syntax
error, unexpected kDO_BLOCK, expecting kEND
');   @posts.each do |post|
/Users/bradwrage/webapps/blog/app/views/posts/index.html.erb:21: syntax
error, unexpected kENSURE, expecting $end

with this here.  Happened as soon as I added the class="btn"  Any ideas?

  <h1> Goals</h1>
3:   </div><br />
4:   <p class="lead">"Shoot for the stars to land on the moon."</p><br
5:   <%= link_to "Post a new Goal", new_post_path, class="btn
btn-success" %>
7:   <% @posts.each do |post| %>

8: <div class="post">
1a4ff0766a653c62e0dab34bacda9873?d=identicon&s=25 Norbert Melzer (Guest)
on 2012-11-01 09:52
(Received via mailing list)
Don't remember the exact syntax, but it should say :class => "btn" as
as I remember.
Am 01.11.2012 02:45 schrieb "wragen22" <>:
A0474e8305e39addf16ccf5e1f11ace6?d=identicon&s=25 enrico stano (enricostn)
on 2012-11-01 12:55
(Received via mailing list)
from the official guide:

Classes and ids for CSS are easy to produce:

link_to "Articles", articles_path, :id => "news", :class => "article"

# => <a href="/articles" class="article" id="news">Articles</a>

Il giorno gioved 1 novembre 2012 09:51:33 UTC+1, Norbert Melzer ha
This topic is locked and can not be replied to.