我正在创建一个新站点,并以此为借口使用 sass-bootstrap。在创建站点的主要布局的过程中,我发现我无法使用“可选行类”下列出的示例对行进行着色。具体来说<tr class="success">
或="error"
。
这是 raid 控制器监视器的视图代码:
<div class="container">
<div class="span12 row"> </div>
<div class="span12 row">
<table class="table">
<thead>
<tr><th>Server</th><th>Status</th><th>Spare</th><th>Last Update</th></tr>
</thead>
<tbody>
<% @raids.each do |raid| %>
<% if raid.status == "OK" && raid.spare == "OK" %>
<tr class="success">
<% else %>
<tr class="error">
<% end %>
<td><%= raid.hostname %></td>
<td><%= raid.status %></td>
<td><%= raid.spare %></td>
<td><%= time_ago_in_words(raid.update_time) %> ago</td>
</tr>
<% end %>
</tbody>
</table>
</div>
</div>
我的宝石:
Using rake (0.9.2.2)
Using i18n (0.6.0)
Using multi_json (1.3.5)
Using activesupport (3.2.3)
Using builder (3.0.0)
Using activemodel (3.2.3)
Using erubis (2.7.0)
Using journey (1.0.3)
Using rack (1.4.1)
Using rack-cache (1.2)
Using rack-test (0.6.1)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.1.3)
Using actionpack (3.2.3)
Using mime-types (1.18)
Using polyglot (0.3.3)
Using treetop (1.4.10)
Using mail (2.4.4)
Using actionmailer (3.2.3)
Using arel (3.0.2)
Using tzinfo (0.3.33)
Using activerecord (3.2.3)
Using activeresource (3.2.3)
Using addressable (2.2.8)
Using annotate (2.4.1.beta1)
Using bcrypt-ruby (3.0.1)
**Using bootstrap-sass (2.1.0.0)**
Using nokogiri (1.5.2)
Using ffi (1.0.11)
Using childprocess (0.3.2)
Using libwebsocket (0.1.3)
Using rubyzip (0.9.8)
Using selenium-webdriver (2.21.2)
Using xpath (0.1.4)
Using capybara (1.1.2)
Using coffee-script-source (1.3.1)
Using execjs (1.3.2)
Using coffee-script (2.2.0)
Using rack-ssl (1.3.2)
Using json (1.7.3)
Using rdoc (3.12)
Using thor (0.14.6)
Using railties (3.2.3)
Using coffee-rails (3.2.2)
Using diff-lcs (1.1.3)
Using factory_girl (3.2.0)
Using factory_girl_rails (3.2.0)
Using faker (1.0.1)
Using guard (1.0.3)
Using guard-rspec (0.5.5)
Using jquery-rails (2.0.2)
Using libnotify (0.5.9)
Using libv8 (3.3.10.4)
Using mysql (2.8.1)
Using bundler (1.1.4)
Using rails (3.2.3)
Using rb-readline (0.4.2)
Using rspec-core (2.9.0)
Using rspec-expectations (2.9.1)
Using rspec-mocks (2.9.0)
Using rspec (2.9.0)
Using rspec-rails (2.9.0)
Using sass (3.1.18)
Using sass-rails (3.2.5)
Using sqlite3 (1.3.6)
Using therubyracer (0.10.1)
Using uglifier (1.2.4)