2017-12-05 2 views
0

Ich versuche https://github.com/jassa/lazyload-rails für meine Bild schwere Website zu installieren.faul: true von Lazyload Bild gem bricht das Bild für Ruby on Rails 5

Bild zeigt nicht, wenn ich die erforderliche faul hinzufügen: true

Does Syntax für Ruby, anders zu sein brauchen on Rails 5?

<%= link_to image_tag(post.image_url.to_s, lazy: true), post_path(post), remote: true %> 

Danke


Gemfile

gem "lazyload-rails" 

application.html.erb

<script> 
    $("img").lazyload(); 
</script> 

Antwort