2016-03-15 73 views
-1

我想寫一個類似下面的導軌select_tag,但我得到一個語法錯誤。選擇標籤syntaxt錯誤導軌

<%=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以及。這裏有什麼錯誤?

+0

什麼錯誤? – Pavan

+0

'syntax error,unexpected')',expected => ... ult-transparent btn-animated「}); @ output_buffer.safe_append ='...' – Suraj

+0

您是否嘗試在移除':class'後嘗試運行? – SpunkyLive

回答

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" %>