Alors comme ça limit ne marche pas pour un array ? Remplacé par sample pour avoir des personnalités random 🆒
This commit is contained in:
parent
9b62922a8b
commit
7871f32e36
1 changed files with 1 additions and 1 deletions
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
|
||||
<td style="width:50%; text-align:right;vertical-align:top;padding-top:20px;">
|
||||
<% subject.associated_public_figures.order(id: :desc).limit(5).each do |public_figure| %>
|
||||
<% subject.associated_public_figures.sample(5).each do |public_figure| %>
|
||||
|
||||
<div style="height:30px; width: 30px; -webkit-border-radius: 50%; border-radius: 50%; background: url('<%= public_figure.picture.url %>') 50% 50% no-repeat; background-size:cover; background-position: center center; float:right; margin-right:15px;"></div>
|
||||
<% end %>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue