fiat_publication 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 898a31959c6ffeeed982846a0ba477604ae4427d
|
4
|
+
data.tar.gz: 3b240033d2dbba02d72241d7bd467769c1704980
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94823cdebb279902c2e499c77609bda20cd190dd4681fdeca2ff1390791e10516deefabf21adc953b50b175755f1f83d436d5d7416d39efc925c4e644e643341
|
7
|
+
data.tar.gz: 50764509160b4b32e0b55cb9db7bf149b5d22d9f7fb3f5260f9420918b8bc67803419420efdff18c27c54699ef437261f4bb5f4ce5031817edc4b00a2126d8c9
|
data/README.md
CHANGED
@@ -90,7 +90,7 @@ Displaying content just requires that you use the typical associations. For exam
|
|
90
90
|
|
91
91
|
```ruby
|
92
92
|
@page.fiat_publication_content_blocks.each do |i|
|
93
|
-
= render partial: 'fiat_publication/content_blocks/show', locals: { content_block: i }
|
93
|
+
= render partial: 'fiat_publication/content_blocks/show', locals: { content_block: i, my_classes: 'custom_classes_here' }
|
94
94
|
end
|
95
95
|
```
|
96
96
|
|
@@ -39,7 +39,7 @@ module FiatPublication
|
|
39
39
|
@content_block.destroy
|
40
40
|
|
41
41
|
respond_to do |format|
|
42
|
-
format.html {
|
42
|
+
format.html { redirect_back(fallback_location: content_blocks_path, notice: 'Block was removed.') }
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
@@ -1,7 +1,9 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
<%
|
5
|
-
|
1
|
+
<div class="<%= my_classes %>">
|
2
|
+
<% if content_block.text? %>
|
3
|
+
<%= simple_format(content_block.text_content) %>
|
4
|
+
<% elsif content_block.image? %>
|
5
|
+
<% if content_block.image.attached? %>
|
6
|
+
<%= image_tag content_block.image.variant(resize: "1200x1200"), width: "100%" %>
|
7
|
+
<% end %>
|
6
8
|
<% end %>
|
7
|
-
|
9
|
+
</div>
|