选择标签syntaxt错误轨道

时间:2016-03-15 06:21:19

标签: css ruby-on-rails

我正在尝试编写如下所示的rails select_tag,但我收到语法错误。

 <%=select_tag "Weight", options_for_select([ "500gms", "1kg" ]), :prompt => "Select Weight ", {:style=>'color:#FFFFFF;',
 :class => "pull-left margin-clear btn btn-sm btn-default-transparent btn-animated"}%>

我也想尝试一个内联css。这里的错误是什么?

1 个答案:

答案 0 :(得分:1)

尝试以下方法:

<%=select_tag "Weight", options_for_select([ "500gms", "1kg" ]), :prompt => "Select Weight ",:style=>'color:#FFFFFF;',
:class => "pull-left margin-clear btn btn-sm btn-default-transparent btn-animated" %>