我使用 Slim 来表达我的观点,并且有这个:
/ = render 'alphabet'
div class="house-list" data-pjax-container="true"
- @houses.each do |house|
= link_to house_path(house)
.picture
= image_tag "http://mylink.com/150/#{house.name.to_s.parameterize}-#{house.location_1.to_s.parameterize}.jpg"
.info
h4 = house.name
p = house.location_1
现在,这是导致问题的 link_to 行,如果我将其替换为纯div
文本,则一切正常,但使用 link_to 会导致:
syntax error, unexpected keyword_ensure, expecting end-of-input
关于什么是错的任何想法?