【发布时间】:2015-11-01 21:29:12
【问题描述】:
我在 Rails 视图中使用image_tag,这是我的代码:
<%= image_tag "01-landing_page.png" class: "img-responsive" %>
但是当我运行它时。我得到了:
app/views/home/index.html.erb:252: syntax error, unexpected ':', expecting ')'
app/views/home/index.html.erb:288: syntax error, unexpected keyword_class, expecting ')'
我在这里做错了什么。我关注了很多 SO 帖子,但他们都提到以相同的方式编写课程。
【问题讨论】:
标签: ruby-on-rails ruby-on-rails-4 view