Skip to content
Snippets Groups Projects
Commit 663d3b3b authored by alexisben's avatar alexisben
Browse files

Fix static bloock posts

parent 0d7cfce5
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,7 @@
<% elsif @block.data['elements'] %>
<div class="row">
<% @block.data['elements'].each do |element| %>
<% post = @block.about&.website.posts.find element['id'] if element['id'] %>
<% post = @block.about&.website.posts.find element['id'] unless element['id'].blank? %>
<% if post %>
<div class="col-md-4">
<div class="card">
......
<% if block.data['category_id'] %>
category: <%= block['category_id'] %>
quantity: <%= block['posts_quantity'] %>
category: <%= block.data['category_id'] %>
quantity: <%= block.data['posts_quantity'] %>
<% elsif block.data['elements'] %>
posts:
<% block.data['elements'].each do |post|
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment