<% @videos.each_with_index do |video, index| %>
<%if(@video.videotype = "vimeo") %>
<iframe width="720" height="480" src="//player.vimeo.com/video/<%=video.videourl %>" frameborder="0" id="player2" ></iframe>
<% else %>
<% if(@video.videotype = "youtube") %>
<iframe width="720" height="480" src="//www.youtube.com/embed/<%=video.videourl %>" frameborder="0" id="player1"></iframe>
<% end %>
<% end %>
</div>
<% end %>
What is wrong with this if else? all my videos display as vimeo player, but the videotype it's ok on database...
Aucun commentaire:
Enregistrer un commentaire