phcdevworks_tutorials 1.1.1 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/phcdevworks_tutorials/tutorial/posts_controller.rb +1 -1
- data/app/controllers/phcdevworks_tutorials/tutorial/steps_controller.rb +1 -1
- data/app/views/phcdevworks_tutorials/tutorial/posts/_form.html.erb +7 -7
- data/app/views/phcdevworks_tutorials/tutorial/steps/_form.html.erb +7 -7
- data/db/migrate/20191002093451_add_image_to_phcdevworks_tutorials_tutorial_posts.rb +8 -0
- data/lib/phcdevworks_tutorials/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6fb02f5f552818db1a3870f7fe9ca6b51b667d24d44a7ef920024e757c04593f
|
4
|
+
data.tar.gz: 35fdd2b2e952c22ec951db3ef331a3ec64378eee415ac476640c6de85931cd7c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1abce4457ca8938d0746020cbc7090288baf7d0d281103b9958dbddd0f4c10c7cf98fc53adf90c35365a89ac338ca4aaa5ab5c5a6b3fbe16dd6e79860ab8c6f1
|
7
|
+
data.tar.gz: a0601147138c7b06999164810be638ee90f1a952da1602c27443881cf33e85f6f367039b956ab6697ac6b89428d305b253d600e7caf8a07b8df9a1a09cf91c85
|
@@ -75,7 +75,7 @@ module PhcdevworksTutorials
|
|
75
75
|
|
76
76
|
# Whitelist
|
77
77
|
def tutorial_post_params
|
78
|
-
params.require(:tutorial_post).permit(:tutorial_post_step, :tutorial_post_title, :tutorial_post_text,:tutorial_post_description, :tutorial_post_status, :
|
78
|
+
params.require(:tutorial_post).permit(:tutorial_post_step, :tutorial_post_title, :tutorial_post_text,:tutorial_post_description, :tutorial_post_status, :tutorial_post_image, :category_id, :slug, :user_id, :org_id)
|
79
79
|
end
|
80
80
|
|
81
81
|
end
|
@@ -88,7 +88,7 @@ module PhcdevworksTutorials
|
|
88
88
|
|
89
89
|
# Whitelist
|
90
90
|
def tutorial_step_params
|
91
|
-
params.require(:tutorial_step).permit(:steps_number, :steps_body, :
|
91
|
+
params.require(:tutorial_step).permit(:steps_number, :steps_body, :tutorial_step_image, :post_id, :slug, :user_id, :org_id)
|
92
92
|
end
|
93
93
|
|
94
94
|
end
|
@@ -21,13 +21,13 @@
|
|
21
21
|
</div>
|
22
22
|
|
23
23
|
<div class="form-group field_with_errors">
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
24
|
+
<div class="form-group field_with_errors">
|
25
|
+
<%= form.label :tutorial_post_image, "Featured Image" %>
|
26
|
+
<%= form.file_field :tutorial_post_image, class: "form-control" %>
|
27
|
+
</div>
|
28
|
+
<% if form.object.tutorial_post_image.attached? %>
|
29
|
+
<%= image_tag main_app.url_for(form.object.tutorial_post_image), class: "img-responsive img-thumbnail" %>
|
30
|
+
<% end %>
|
31
31
|
</div>
|
32
32
|
|
33
33
|
<div class="form-group field_with_errors">
|
@@ -16,13 +16,13 @@
|
|
16
16
|
</div>
|
17
17
|
|
18
18
|
<div class="form-group field_with_errors">
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
19
|
+
<div class="form-group field_with_errors">
|
20
|
+
<%= form.label :tutorial_step_image, "Step Image" %>
|
21
|
+
<%= form.file_field :tutorial_step_image, class: "form-control" %>
|
22
|
+
</div>
|
23
|
+
<% if form.object.tutorial_step_image.attached? %>
|
24
|
+
<%= image_tag main_app.url_for(form.object.tutorial_step_image), class: "img-responsive img-thumbnail" %>
|
25
|
+
<% end %>
|
26
26
|
</div>
|
27
27
|
<!-- Form Input Fields -->
|
28
28
|
|
@@ -0,0 +1,8 @@
|
|
1
|
+
class AddImageToPhcdevworksTutorialsTutorialPosts < ActiveRecord::Migration[6.0]
|
2
|
+
def change
|
3
|
+
|
4
|
+
add_column :phcdevworks_tutorials_tutorial_steps, :tutorial_step_image, :string
|
5
|
+
add_column :phcdevworks_tutorials_tutorial_posts, :tutorial_post_image, :string
|
6
|
+
|
7
|
+
end
|
8
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phcdevworks_tutorials
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PHCDevworks
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -288,6 +288,7 @@ files:
|
|
288
288
|
- db/migrate/20190923113101_create_phcdevworks_tutorials_tutorial_steps.rb
|
289
289
|
- db/migrate/20190929044403_add_info_to_phcdevworks_tutorials_tutorial_posts.rb
|
290
290
|
- db/migrate/20190929044505_add_info_to_phcdevworks_tutorials_tutorial_steps.rb
|
291
|
+
- db/migrate/20191002093451_add_image_to_phcdevworks_tutorials_tutorial_posts.rb
|
291
292
|
- lib/phcdevworks_tutorials.rb
|
292
293
|
- lib/phcdevworks_tutorials/engine.rb
|
293
294
|
- lib/phcdevworks_tutorials/version.rb
|