Designating CSS class throwing error?

8 views
Skip to first unread message

wragen22

unread,
Oct 8, 2012, 10:05:25 PM10/8/12
to rubyonra...@googlegroups.com
For some reason getting this error.  Following a tutorial step by step.  Why would the added "class: "btn ect" be the problem?

compile error
/Users/bradwrage/webapps/treebook/app/views/statuses/index.html.erb:5: syntax error, unexpected ':'
...atus", new_status_path, class: "btn btn-success" );@output_b...
                              ^
/Users/bradwrage/webapps/treebook/app/views/statuses/index.html.erb:7: syntax error, unexpected kDO_BLOCK, expecting kEND
'); @statuses.each do | status| 
                     ^
/Users/bradwrage/webapps/treebook/app/views/statuses/index.html.erb:21: syntax error, unexpected kENSURE, expecting $end

<h1> All of the Statuses</h1>
3: </div>
4: 
5: <%= link_to "Post a New Status", new_status_path, class: "btn btn-success" %>
6: 
7: <% @statuses.each do | status| %> 
8: <div class="status"> 

Javier Quarite

unread,
Oct 8, 2012, 10:28:03 PM10/8/12
to rubyonra...@googlegroups.com
try:

:class => "btn btn-success" 

maybe its your ruby version

Javier Q

Reply all
Reply to author
Forward
0 new messages