phcdevworks_tutorials 2.1.1 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/config/phcdevworks_tutorials_manifest.js +1 -1
- data/app/assets/stylesheets/phcdevworks_tutorials/category/posts.css +4 -0
- data/app/assets/stylesheets/phcdevworks_tutorials/tutorial/posts.css +4 -0
- data/app/assets/stylesheets/phcdevworks_tutorials/tutorial/steps.css +4 -0
- data/app/controllers/phcdevworks_tutorials/tutorial/categories_controller.rb +1 -2
- data/app/controllers/phcdevworks_tutorials/tutorial/posts_controller.rb +5 -6
- data/app/controllers/phcdevworks_tutorials/tutorial/steps_controller.rb +6 -12
- data/app/models/phcdevworks_tutorials/category.rb +7 -0
- data/app/models/phcdevworks_tutorials/tutorial/post.rb +1 -1
- data/app/models/phcdevworks_tutorials/tutorial/step.rb +1 -1
- data/app/views/layouts/phcdevworks_tutorials/frontend.html.erb +0 -0
- data/app/views/phcdevworks_tutorials/tutorial/steps/_form.html.erb +2 -4
- data/app/views/phcdevworks_tutorials/tutorial/steps/edit.html.erb +1 -1
- data/config/routes.rb +3 -12
- data/db/migrate/{20190911225813_create_phcdevworks_tutorials_tutorial_posts.rb → 20191017235259_create_phcdevworks_tutorials_tutorial_posts.rb} +1 -3
- data/db/migrate/{20190923113101_create_phcdevworks_tutorials_tutorial_steps.rb → 20191017235421_create_phcdevworks_tutorials_tutorial_steps.rb} +2 -4
- data/db/migrate/{20190911225925_create_phcdevworks_tutorials_tutorial_categories.rb → 20191018124910_create_phcdevworks_tutorials_tutorial_categories.rb} +0 -0
- data/lib/phcdevworks_tutorials/version.rb +1 -1
- metadata +10 -9
- data/app/assets/javascripts/phcdevworks_tutorials/tutorial/posts.coffee +0 -3
- data/app/assets/javascripts/phcdevworks_tutorials/tutorial/steps.coffee +0 -3
- data/app/assets/stylesheets/phcdevworks_tutorials/tutorial/posts.scss +0 -3
- data/app/assets/stylesheets/phcdevworks_tutorials/tutorial/steps.scss +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33e27b7f41f07b09e2baff0704a5aba9588b2408eff2c2d1824539e2b804d561
|
4
|
+
data.tar.gz: adfd438d8a8b1217fea7e9df4da3f77ccb3581f22dc6112a15e5e50809120b3a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a24a436b3be0a2026e93abaf93ff77048fe3fbd916ff50d966660d572c91bac5250218338f9bbb862592ccad5e03b5ebe7a6b57a32d20172fef0729f6465022
|
7
|
+
data.tar.gz: 541c6f66f94a4850c67b2617894b87ad7f1ff2a632c6bfbf15fcf09b5a04f249b86e0f202ce251f2751be8a50e50f2e728fcc513f83156c8301f68d68384aae7
|
@@ -16,7 +16,6 @@ module PhcdevworksTutorials
|
|
16
16
|
|
17
17
|
# GET /tutorial/categories/1
|
18
18
|
def show
|
19
|
-
@tutorial_category = Tutorial::Category.friendly.find(params[:id])
|
20
19
|
end
|
21
20
|
|
22
21
|
# GET /tutorial/categories/new
|
@@ -70,7 +69,7 @@ module PhcdevworksTutorials
|
|
70
69
|
|
71
70
|
# Common Callbacks
|
72
71
|
def set_tutorial_category
|
73
|
-
@tutorial_category = Tutorial::Category.
|
72
|
+
@tutorial_category = Tutorial::Category.find(params[:id])
|
74
73
|
end
|
75
74
|
|
76
75
|
# Whitelist
|
@@ -16,7 +16,6 @@ module PhcdevworksTutorials
|
|
16
16
|
|
17
17
|
# GET /tutorial/posts/1
|
18
18
|
def show
|
19
|
-
@tutorial_post = Tutorial::Post.friendly.find(params[:id])
|
20
19
|
end
|
21
20
|
|
22
21
|
# GET /tutorial/posts/new
|
@@ -60,9 +59,9 @@ module PhcdevworksTutorials
|
|
60
59
|
# DELETE /tutorial/posts/1
|
61
60
|
def destroy
|
62
61
|
@tutorial_post.destroy
|
63
|
-
|
64
|
-
|
65
|
-
|
62
|
+
respond_to do |format|
|
63
|
+
format.html { redirect_to tutorial_posts_path, :flash => { :error => 'Tutorial has been Removed.' }}
|
64
|
+
format.json { head :no_content }
|
66
65
|
end
|
67
66
|
end
|
68
67
|
|
@@ -70,12 +69,12 @@ module PhcdevworksTutorials
|
|
70
69
|
|
71
70
|
# Common Callbacks
|
72
71
|
def set_tutorial_post
|
73
|
-
@tutorial_post = Tutorial::Post.
|
72
|
+
@tutorial_post = Tutorial::Post.find(params[:id])
|
74
73
|
end
|
75
74
|
|
76
75
|
# Whitelist
|
77
76
|
def tutorial_post_params
|
78
|
-
params.require(:tutorial_post).permit(:
|
77
|
+
params.require(:tutorial_post).permit(:tutorial_post_title, :tutorial_post_description, :tutorial_post_status, :tutorial_post_image, :slug, :user_id, :org_id)
|
79
78
|
end
|
80
79
|
|
81
80
|
end
|
@@ -10,13 +10,11 @@ module PhcdevworksTutorials
|
|
10
10
|
before_action :set_tutorial_step, only: [:show, :edit, :update, :destroy]
|
11
11
|
|
12
12
|
# GET /tutorial/steps
|
13
|
-
# GET /tutorial/steps.json
|
14
13
|
def index
|
15
|
-
@tutorial_steps = tutorial_post.steps.
|
14
|
+
@tutorial_steps = tutorial_post.steps.order("tutorial_step_number")
|
16
15
|
end
|
17
16
|
|
18
17
|
# GET /tutorial/steps/1
|
19
|
-
# GET /tutorial/steps/1.json
|
20
18
|
def show
|
21
19
|
@tutorial_step = tutorial_post.steps.find(params[:id])
|
22
20
|
end
|
@@ -28,18 +26,17 @@ module PhcdevworksTutorials
|
|
28
26
|
|
29
27
|
# GET /tutorial/steps/1/edit
|
30
28
|
def edit
|
31
|
-
@
|
29
|
+
@tutorial_post = Tutorial::Post.friendly.find(params[:post_id])
|
32
30
|
end
|
33
31
|
|
34
32
|
# POST /tutorial/steps
|
35
|
-
# POST /tutorial/steps.json
|
36
33
|
def create
|
37
34
|
@tutorial_step = tutorial_post.steps.create(tutorial_step_params)
|
38
35
|
@tutorial_step.user_id = current_user.id
|
39
36
|
@tutorial_step.org_id = current_user.org_id
|
40
37
|
respond_to do |format|
|
41
38
|
if @tutorial_step.save
|
42
|
-
format.html { redirect_to
|
39
|
+
format.html { redirect_to tutorial_post_steps_url, :flash => { :success => 'Member Listing has been Added' }}
|
43
40
|
format.json { render :show, status: :created, location: @tutorial_step }
|
44
41
|
else
|
45
42
|
format.html { render :new }
|
@@ -49,12 +46,11 @@ module PhcdevworksTutorials
|
|
49
46
|
end
|
50
47
|
|
51
48
|
# PATCH/PUT /tutorial/steps/1
|
52
|
-
# PATCH/PUT /tutorial/steps/1.json
|
53
49
|
def update
|
54
50
|
@tutorial_post = Tutorial::Post.friendly.find(params[:post_id])
|
55
51
|
respond_to do |format|
|
56
52
|
if @tutorial_step.update(tutorial_step_params)
|
57
|
-
format.html { redirect_to
|
53
|
+
format.html { redirect_to tutorial_post_steps_url, :flash => { :notice => 'Member Listing has been Updated.' }}
|
58
54
|
format.json { render :show, status: :ok, location: @tutorial_step }
|
59
55
|
else
|
60
56
|
format.html { render :edit }
|
@@ -64,12 +60,11 @@ module PhcdevworksTutorials
|
|
64
60
|
end
|
65
61
|
|
66
62
|
# DELETE /tutorial/steps/1
|
67
|
-
# DELETE /tutorial/steps/1.json
|
68
63
|
def destroy
|
69
64
|
@tutorial_step = tutorial_post.steps.find(params[:id])
|
70
65
|
@tutorial_step.destroy
|
71
66
|
respond_to do |format|
|
72
|
-
format.html { redirect_to
|
67
|
+
format.html { redirect_to tutorial_post_steps_url, :flash => { :error => 'Member Listing has been Removed' }}
|
73
68
|
format.json { head :no_content }
|
74
69
|
end
|
75
70
|
end
|
@@ -77,7 +72,6 @@ module PhcdevworksTutorials
|
|
77
72
|
private
|
78
73
|
|
79
74
|
# Common Callbacks
|
80
|
-
|
81
75
|
def set_tutorial_step
|
82
76
|
@tutorial_step = Tutorial::Step.find(params[:id])
|
83
77
|
end
|
@@ -88,7 +82,7 @@ module PhcdevworksTutorials
|
|
88
82
|
|
89
83
|
# Whitelist
|
90
84
|
def tutorial_step_params
|
91
|
-
params.require(:tutorial_step).permit(:tutorial_step_number, :
|
85
|
+
params.require(:tutorial_step).permit(:tutorial_step_number, :tutorial_step_title, :tutorial_step_description, :tutorial_step_image, :post_id, :slug, :user_id, :org_id)
|
92
86
|
end
|
93
87
|
|
94
88
|
end
|
@@ -5,7 +5,7 @@ module PhcdevworksTutorials
|
|
5
5
|
has_one_attached :tutorial_step_image
|
6
6
|
|
7
7
|
# Relationships
|
8
|
-
belongs_to :post, class_name: "
|
8
|
+
belongs_to :post, class_name: "Tutorial::Post"
|
9
9
|
has_many :categories, class_name: "Tutorial::Category", :through => :post
|
10
10
|
belongs_to :user, class_name: "PhcdevworksAccounts::User"
|
11
11
|
|
File without changes
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<!-- Form - Tutorial - Posts -->
|
2
|
-
<%= form_with(model: [
|
2
|
+
<%= form_with(model: [@tutorial_post, @tutorial_step], url: form_url, local: true) do |form| %>
|
3
3
|
|
4
4
|
<!-- PHCNotifi Render Validation -->
|
5
5
|
<%= render "phcdevworks_notifications/bootstrap/validations", :object => @tutorial_step %>
|
@@ -25,9 +25,7 @@
|
|
25
25
|
<%= form.label :tutorial_step_image, "Step Image" %>
|
26
26
|
<%= form.file_field :tutorial_step_image, class: "form-control" %>
|
27
27
|
</div>
|
28
|
-
|
29
|
-
<%= image_tag main_app.url_for(form.object.tutorial_step_image), class: "img-responsive img-thumbnail" %>
|
30
|
-
<% end %>
|
28
|
+
|
31
29
|
<!-- Form Input Fields -->
|
32
30
|
|
33
31
|
<!-- Form Submition Button -->
|
data/config/routes.rb
CHANGED
@@ -1,20 +1,11 @@
|
|
1
1
|
PhcdevworksTutorials::Engine.routes.draw do
|
2
2
|
|
3
|
-
namespace :tutorial do
|
4
|
-
resources :steps
|
5
|
-
end
|
6
|
-
namespace :tutorial do
|
7
|
-
resources :posts
|
8
|
-
end
|
9
|
-
namespace :tutorial do
|
10
|
-
resources :categories
|
11
|
-
end
|
12
3
|
# Tutorial Routs
|
13
4
|
namespace :tutorial do
|
14
|
-
resources :posts, class_name: "
|
15
|
-
resources :steps, class_name: "
|
5
|
+
resources :posts, class_name: "Tutorial::Post" do
|
6
|
+
resources :steps, class_name: "Tutorial::Step"
|
16
7
|
end
|
17
|
-
resources :categories, class_name: "
|
8
|
+
resources :categories, class_name: "Tutorial::Category"
|
18
9
|
end
|
19
10
|
|
20
11
|
# Frontend Routes
|
@@ -3,11 +3,9 @@ class CreatePhcdevworksTutorialsTutorialPosts < ActiveRecord::Migration[6.0]
|
|
3
3
|
create_table :phcdevworks_tutorials_tutorial_posts do |t|
|
4
4
|
|
5
5
|
t.string :tutorial_post_title
|
6
|
-
t.
|
6
|
+
t.string :tutorial_post_description
|
7
7
|
t.string :tutorial_post_status
|
8
|
-
|
9
8
|
t.string :tutorial_post_image
|
10
|
-
t.string :tutorial_post_images
|
11
9
|
|
12
10
|
t.string :slug
|
13
11
|
t.string :user_id
|
@@ -2,12 +2,10 @@ class CreatePhcdevworksTutorialsTutorialSteps < ActiveRecord::Migration[6.0]
|
|
2
2
|
def change
|
3
3
|
create_table :phcdevworks_tutorials_tutorial_steps do |t|
|
4
4
|
|
5
|
-
t.
|
5
|
+
t.string :tutorial_step_number
|
6
6
|
t.string :tutorial_step_title
|
7
|
-
t.
|
8
|
-
|
7
|
+
t.string :tutorial_step_description
|
9
8
|
t.string :tutorial_step_image
|
10
|
-
t.string :tutorial_step_images
|
11
9
|
|
12
10
|
t.string :slug
|
13
11
|
t.string :user_id
|
File without changes
|
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: 2.1.
|
4
|
+
version: 2.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PHCDevworks
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-10-
|
11
|
+
date: 2019-10-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -254,13 +254,12 @@ files:
|
|
254
254
|
- app/assets/javascripts/phcdevworks_tutorials/application.js
|
255
255
|
- app/assets/javascripts/phcdevworks_tutorials/blog/tutorials.coffee
|
256
256
|
- app/assets/javascripts/phcdevworks_tutorials/tutorial/categories.coffee
|
257
|
-
- app/assets/javascripts/phcdevworks_tutorials/tutorial/posts.coffee
|
258
|
-
- app/assets/javascripts/phcdevworks_tutorials/tutorial/steps.coffee
|
259
257
|
- app/assets/stylesheets/phcdevworks_tutorials/application.scss
|
260
258
|
- app/assets/stylesheets/phcdevworks_tutorials/blog/tutorials.scss
|
259
|
+
- app/assets/stylesheets/phcdevworks_tutorials/category/posts.css
|
261
260
|
- app/assets/stylesheets/phcdevworks_tutorials/tutorial/categories.scss
|
262
|
-
- app/assets/stylesheets/phcdevworks_tutorials/tutorial/posts.
|
263
|
-
- app/assets/stylesheets/phcdevworks_tutorials/tutorial/steps.
|
261
|
+
- app/assets/stylesheets/phcdevworks_tutorials/tutorial/posts.css
|
262
|
+
- app/assets/stylesheets/phcdevworks_tutorials/tutorial/steps.css
|
264
263
|
- app/controllers/phcdevworks_tutorials/application_controller.rb
|
265
264
|
- app/controllers/phcdevworks_tutorials/blog/tutorials_controller.rb
|
266
265
|
- app/controllers/phcdevworks_tutorials/tutorial/categories_controller.rb
|
@@ -274,6 +273,7 @@ files:
|
|
274
273
|
- app/jobs/phcdevworks_tutorials/application_job.rb
|
275
274
|
- app/mailers/phcdevworks_tutorials/application_mailer.rb
|
276
275
|
- app/models/phcdevworks_tutorials/application_record.rb
|
276
|
+
- app/models/phcdevworks_tutorials/category.rb
|
277
277
|
- app/models/phcdevworks_tutorials/tutorial.rb
|
278
278
|
- app/models/phcdevworks_tutorials/tutorial/category.rb
|
279
279
|
- app/models/phcdevworks_tutorials/tutorial/post.rb
|
@@ -282,6 +282,7 @@ files:
|
|
282
282
|
- app/views/layouts/phcdevworks_tutorials/components/backend/footer/_footer.html.erb
|
283
283
|
- app/views/layouts/phcdevworks_tutorials/components/backend/navigation/_top_menu.html.erb
|
284
284
|
- app/views/layouts/phcdevworks_tutorials/components/backend/sidebars/_side_menu.html.erb
|
285
|
+
- app/views/layouts/phcdevworks_tutorials/frontend.html.erb
|
285
286
|
- app/views/phcdevworks_tutorials/blog/tutorials/index.html.erb
|
286
287
|
- app/views/phcdevworks_tutorials/blog/tutorials/show.html.erb
|
287
288
|
- app/views/phcdevworks_tutorials/tutorial/categories/_form.html.erb
|
@@ -300,10 +301,10 @@ files:
|
|
300
301
|
- app/views/phcdevworks_tutorials/tutorial/steps/new.html.erb
|
301
302
|
- app/views/phcdevworks_tutorials/tutorial/steps/show.html.erb
|
302
303
|
- config/routes.rb
|
303
|
-
- db/migrate/20190911225813_create_phcdevworks_tutorials_tutorial_posts.rb
|
304
|
-
- db/migrate/20190911225925_create_phcdevworks_tutorials_tutorial_categories.rb
|
305
|
-
- db/migrate/20190923113101_create_phcdevworks_tutorials_tutorial_steps.rb
|
306
304
|
- db/migrate/20191003235303_create_join_table_categories_posts.rb
|
305
|
+
- db/migrate/20191017235259_create_phcdevworks_tutorials_tutorial_posts.rb
|
306
|
+
- db/migrate/20191017235421_create_phcdevworks_tutorials_tutorial_steps.rb
|
307
|
+
- db/migrate/20191018124910_create_phcdevworks_tutorials_tutorial_categories.rb
|
307
308
|
- lib/phcdevworks_tutorials.rb
|
308
309
|
- lib/phcdevworks_tutorials/engine.rb
|
309
310
|
- lib/phcdevworks_tutorials/version.rb
|