为什么我的image_tag不起作用?

时间:2017-05-01 22:07:16

标签: css ruby-on-rails ruby erb

Iamge_tag:

<%= image_tag ("face9", :class => "style_image") %>

的CSS:

.style_image {
  border-right: 1px solid #000;
}

错误:

C:/Sites/AcuSimonv/app/views/acupuntura/inicio.html.erb:54:语法错误,意外',',期待')'... er.append =(image_tag(“face9”, :class =&gt;“。style_image”)); ...... ... ^ C:/Sites/AcuSimonv/app/views/acupuntura/inicio.html.erb:54:语法错误,意外')',期待keyword_end ... 9“,:class =&gt;”。style_image“)); @ output_buffer.safe_append ='... ^

1 个答案:

答案 0 :(得分:1)

不应该是image_tag(之间的空格:

<%= image_tag("face9", :class => "style_image") %>

image_tag