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" %> 6: 7: <% @posts.each do |post| %> 8: <div class="post"> -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/B1egdfsDE-0J. For more options, visit https://groups.google.com/groups/opt_out.
Don''t remember the exact syntax, but it should say :class => "btn" as far as I remember. Am 01.11.2012 02:45 schrieb "wragen22" <bradwrage-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:> 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" %> > 6: > 7: <% @posts.each do |post| %> > > 8: <div class="post"> > > > > > > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msg/rubyonrails-talk/-/B1egdfsDE-0J. > For more options, visit https://groups.google.com/groups/opt_out. > > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
from the official guide: http://api.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html#method-i-link_to 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 scritto:> > Don''t remember the exact syntax, but it should say :class => "btn" as far > as I remember. > Am 01.11.2012 02:45 schrieb "wragen22" <brad...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <javascript:>>: > >> 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" %> >> 6: >> 7: <% @posts.each do |post| %> >> >> 8: <div class="post"> >> >> >> >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Talk" group. >> To post to this group, send email to rubyonra...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<javascript:> >> . >> To unsubscribe from this group, send email to >> rubyonrails-ta...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msg/rubyonrails-talk/-/B1egdfsDE-0J. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/XfYosvf8-yIJ. For more options, visit https://groups.google.com/groups/opt_out.