phcdevworks_tutorials 2.1.2 → 5.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -27
- data/app/controllers/phcdevworks_tutorials/blog/tutorials_controller.rb +1 -1
- data/app/controllers/phcdevworks_tutorials/tutorial/categories_controller.rb +1 -1
- data/app/controllers/phcdevworks_tutorials/tutorial/posts_controller.rb +1 -1
- data/app/controllers/phcdevworks_tutorials/tutorial/steps_controller.rb +2 -2
- data/app/models/phcdevworks_tutorials/tutorial/category.rb +6 -3
- data/app/models/phcdevworks_tutorials/tutorial/post.rb +10 -7
- data/app/models/phcdevworks_tutorials/tutorial/step.rb +4 -1
- data/app/models/phcdevworks_tutorials/tutorial_category_versions.rb +5 -0
- data/app/models/phcdevworks_tutorials/tutorial_post_versions.rb +5 -0
- data/app/models/phcdevworks_tutorials/tutorial_step_versions.rb +5 -0
- data/app/views/layouts/phcdevworks_tutorials/application.html.erb +2 -2
- data/app/views/layouts/phcdevworks_tutorials/components/backend/sidebars/_side_menu.html.erb +22 -0
- data/app/views/phcdevworks_tutorials/tutorial/categories/_form.html.erb +2 -2
- data/app/views/phcdevworks_tutorials/tutorial/categories/index.html.erb +1 -1
- data/app/views/phcdevworks_tutorials/tutorial/categories/show.html.erb +1 -1
- data/app/views/phcdevworks_tutorials/tutorial/posts/_form.html.erb +11 -11
- data/app/views/phcdevworks_tutorials/tutorial/posts/index.html.erb +3 -3
- data/app/views/phcdevworks_tutorials/tutorial/steps/_form.html.erb +8 -8
- data/app/views/phcdevworks_tutorials/tutorial/steps/index.html.erb +2 -2
- data/config/routes.rb +18 -18
- data/db/migrate/20191017235259_create_phcdevworks_tutorials_tutorial_posts.rb +4 -4
- data/db/migrate/20191017235421_create_phcdevworks_tutorials_tutorial_steps.rb +4 -4
- data/db/migrate/20191018124910_create_phcdevworks_tutorials_tutorial_categories.rb +1 -1
- data/db/migrate/20191024232406_create_phcdevworks_tutorials_categories_posts.rb +8 -0
- data/db/migrate/20191102093129_create_phcdevworks_tutorials_tutorial_post_versions.rb +19 -0
- data/db/migrate/20191102093146_create_phcdevworks_tutorials_tutorial_step_versions.rb +19 -0
- data/db/migrate/20191102093157_create_phcdevworks_tutorials_tutorial_category_versions.rb +18 -0
- data/lib/phcdevworks_tutorials/version.rb +1 -1
- metadata +9 -4
- data/app/models/phcdevworks_tutorials/category.rb +0 -7
- data/db/migrate/20191003235303_create_join_table_categories_posts.rb +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 911021b85eef6a1a6e1e1d5f545e498e2d4577d499ebda07163fe2867b8993f3
|
4
|
+
data.tar.gz: c5bac2a5b843898df28d301d98e76f8f76c5b5233538833ee466ccafc40617b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9097d1fc460e2e6aaa6e0348fc2db42321b235c6486733fa2d32e09026ee746d68ca6315a7224922c48d01edee518cd83e113925f0894f3fe705a147283c6cb
|
7
|
+
data.tar.gz: be0ae7cb36f5feeca4a6763171213b533541062206599ca9feb5b74a6ed03169ba4196a8bdecaf218b98c2073d7c5e9e5b6b2d21f3f28aa78f4170234365cf2b
|
data/README.md
CHANGED
@@ -1,28 +1 @@
|
|
1
1
|
# PhcdevworksTutorials
|
2
|
-
Short description and motivation.
|
3
|
-
|
4
|
-
## Usage
|
5
|
-
How to use my plugin.
|
6
|
-
|
7
|
-
## Installation
|
8
|
-
Add this line to your application's Gemfile:
|
9
|
-
|
10
|
-
```ruby
|
11
|
-
gem 'phcdevworks_tutorials'
|
12
|
-
```
|
13
|
-
|
14
|
-
And then execute:
|
15
|
-
```bash
|
16
|
-
$ bundle
|
17
|
-
```
|
18
|
-
|
19
|
-
Or install it yourself as:
|
20
|
-
```bash
|
21
|
-
$ gem install phcdevworks_tutorials
|
22
|
-
```
|
23
|
-
|
24
|
-
## Contributing
|
25
|
-
Contribution directions go here.
|
26
|
-
|
27
|
-
## License
|
28
|
-
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
@@ -74,7 +74,7 @@ module PhcdevworksTutorials
|
|
74
74
|
|
75
75
|
# Whitelist
|
76
76
|
def tutorial_category_params
|
77
|
-
params.require(:tutorial_category).permit(:
|
77
|
+
params.require(:tutorial_category).permit(:category_name, :slug, :user_id, :org_id)
|
78
78
|
end
|
79
79
|
|
80
80
|
end
|
@@ -74,7 +74,7 @@ module PhcdevworksTutorials
|
|
74
74
|
|
75
75
|
# Whitelist
|
76
76
|
def tutorial_post_params
|
77
|
-
params.require(:tutorial_post).permit(:
|
77
|
+
params.require(:tutorial_post).permit(:post_title, :post_description, :post_status, :post_image, :slug, :user_id, :org_id, category_ids: [])
|
78
78
|
end
|
79
79
|
|
80
80
|
end
|
@@ -11,7 +11,7 @@ module PhcdevworksTutorials
|
|
11
11
|
|
12
12
|
# GET /tutorial/steps
|
13
13
|
def index
|
14
|
-
@tutorial_steps = tutorial_post.steps.order("
|
14
|
+
@tutorial_steps = tutorial_post.steps.order("step_number")
|
15
15
|
end
|
16
16
|
|
17
17
|
# GET /tutorial/steps/1
|
@@ -82,7 +82,7 @@ module PhcdevworksTutorials
|
|
82
82
|
|
83
83
|
# Whitelist
|
84
84
|
def tutorial_step_params
|
85
|
-
params.require(:tutorial_step).permit(:
|
85
|
+
params.require(:tutorial_step).permit(:step_number, :step_title, :step_description, :step_image, :post_id, :slug, :user_id, :org_id)
|
86
86
|
end
|
87
87
|
|
88
88
|
end
|
@@ -4,11 +4,14 @@ module PhcdevworksTutorials
|
|
4
4
|
# Clean URL Initialize
|
5
5
|
extend FriendlyId
|
6
6
|
|
7
|
+
# Paper Trail Initialize
|
8
|
+
has_paper_trail :class_name => 'PhcdevworksTutorials::TutorialCategoryVersions'
|
9
|
+
|
7
10
|
#Relationships
|
8
|
-
has_and_belongs_to_many :posts, class_name:
|
11
|
+
has_and_belongs_to_many :posts, class_name: "Tutorial::Post", :join_table => "phcdevworks_tutorials_categories_posts", :dependent => :destroy
|
9
12
|
|
10
13
|
# Form Fields Validation
|
11
|
-
validates :
|
14
|
+
validates :category_name,
|
12
15
|
presence: true,
|
13
16
|
uniqueness: true
|
14
17
|
|
@@ -16,7 +19,7 @@ module PhcdevworksTutorials
|
|
16
19
|
friendly_id :phcdev_tutorials_category_nice_urls, use: [:slugged, :finders]
|
17
20
|
|
18
21
|
def phcdev_tutorials_category_nice_urls
|
19
|
-
[:
|
22
|
+
[:category_name]
|
20
23
|
end
|
21
24
|
|
22
25
|
end
|
@@ -4,26 +4,29 @@ module PhcdevworksTutorials
|
|
4
4
|
# Clean URL Initialize
|
5
5
|
extend FriendlyId
|
6
6
|
|
7
|
+
# Paper Trail Initialize
|
8
|
+
has_paper_trail :class_name => 'PhcdevworksTutorials::TutorialPostVersions'
|
9
|
+
|
7
10
|
# Image Upload
|
8
|
-
has_one_attached :
|
11
|
+
has_one_attached :post_image
|
9
12
|
|
10
13
|
# Relationships
|
11
|
-
has_and_belongs_to_many :categories, class_name: "Tutorial::Category", :join_table => "
|
14
|
+
has_and_belongs_to_many :categories, class_name: "Tutorial::Category", :join_table => "phcdevworks_tutorials_categories_posts", :dependent => :destroy
|
12
15
|
has_many :steps, class_name: "Tutorial::Step"
|
13
16
|
belongs_to :user, class_name: "PhcdevworksAccounts::User"
|
14
17
|
|
15
18
|
# Form Fields Validation
|
16
|
-
validates :
|
19
|
+
validates :post_title,
|
17
20
|
presence: true
|
18
21
|
|
19
|
-
validates :
|
22
|
+
validates :post_description,
|
20
23
|
presence: true
|
21
24
|
|
22
25
|
# Clean URL Define
|
23
|
-
friendly_id :
|
26
|
+
friendly_id :phcdev_tutorial_post_nice_urls, use: [:slugged, :finders]
|
24
27
|
|
25
|
-
def
|
26
|
-
[:
|
28
|
+
def phcdev_tutorial_post_nice_urls
|
29
|
+
[:post_title]
|
27
30
|
end
|
28
31
|
|
29
32
|
end
|
@@ -1,8 +1,11 @@
|
|
1
1
|
module PhcdevworksTutorials
|
2
2
|
class Tutorial::Step < ApplicationRecord
|
3
3
|
|
4
|
+
# Paper Trail Initialize
|
5
|
+
has_paper_trail :class_name => 'PhcdevworksTutorials::TutorialStepVersions'
|
6
|
+
|
4
7
|
# Image Upload
|
5
|
-
has_one_attached :
|
8
|
+
has_one_attached :step_image
|
6
9
|
|
7
10
|
# Relationships
|
8
11
|
belongs_to :post, class_name: "Tutorial::Post"
|
@@ -3,8 +3,8 @@
|
|
3
3
|
<head>
|
4
4
|
|
5
5
|
<!-- SEO System -->
|
6
|
-
<% phc_seo_title "PHCDevworks
|
7
|
-
<% phc_seo_description "Ruby on Rails 6
|
6
|
+
<% phc_seo_title "PHCDevworks Tutorials" %>
|
7
|
+
<% phc_seo_description "Ruby on Rails 6 Engine to Manage Online Tutorials." %>
|
8
8
|
<!-- SEO System -->
|
9
9
|
|
10
10
|
<!-- SEO and Site Description -->
|
data/app/views/layouts/phcdevworks_tutorials/components/backend/sidebars/_side_menu.html.erb
CHANGED
@@ -81,6 +81,28 @@
|
|
81
81
|
<li class="<%= phc_menu_active_controller("phcdevworks_portfolio/project/posts#new") %>"><%= link_to("New Project", phcdevworks_portfolio.new_project_post_path) %></li>
|
82
82
|
</ul>
|
83
83
|
</li>
|
84
|
+
<li class="has-sub">
|
85
|
+
<a href="javascript:;">
|
86
|
+
<b class="caret"></b>
|
87
|
+
<i class="fad fa-sitemap"></i>
|
88
|
+
<span>Project Categories</span>
|
89
|
+
</a>
|
90
|
+
<ul class="sub-menu">
|
91
|
+
<li class="<%= phc_menu_active_controller("phcdevworks_portfolio/project/posts") %>"><%= link_to("Project Category", phcdevworks_portfolio.project_categories_path) %></li>
|
92
|
+
<li class="<%= phc_menu_active_controller("phcdevworks_portfolio/project/posts#new") %>"><%= link_to("New Category", phcdevworks_portfolio.new_project_category_path) %></li>
|
93
|
+
</ul>
|
94
|
+
</li>
|
95
|
+
<li class="has-sub">
|
96
|
+
<a href="javascript:;">
|
97
|
+
<b class="caret"></b>
|
98
|
+
<i class="fad fa-folders"></i>
|
99
|
+
<span>Project Types</span>
|
100
|
+
</a>
|
101
|
+
<ul class="sub-menu">
|
102
|
+
<li class="<%= phc_menu_active_controller("phcdevworks_portfolio/project/posts") %>"><%= link_to("Project Type", phcdevworks_portfolio.project_types_path) %></li>
|
103
|
+
<li class="<%= phc_menu_active_controller("phcdevworks_portfolio/project/posts#new") %>"><%= link_to("New Types", phcdevworks_portfolio.new_project_type_path) %></li>
|
104
|
+
</ul>
|
105
|
+
</li>
|
84
106
|
<!-- Sidebar - Sidebar Navigation - PHCDevworks Press -->
|
85
107
|
<% end %>
|
86
108
|
|
@@ -7,8 +7,8 @@
|
|
7
7
|
|
8
8
|
<!-- Form Input Fields -->
|
9
9
|
<div class="form-group field_with_errors">
|
10
|
-
<%= form.label :
|
11
|
-
<%= form.text_field :
|
10
|
+
<%= form.label :category_name, "Tutorial Category" %>
|
11
|
+
<%= form.text_field :category_name, placeholder: "Category Name", class: "form-control" %>
|
12
12
|
</div>
|
13
13
|
<!-- Form Input Fields -->
|
14
14
|
|
@@ -46,7 +46,7 @@
|
|
46
46
|
<tbody>
|
47
47
|
<% @tutorial_categories.each do |tutorial_category| %>
|
48
48
|
<tr>
|
49
|
-
<td><%= tutorial_category.
|
49
|
+
<td><%= tutorial_category.category_name %></td>
|
50
50
|
<td>
|
51
51
|
<div class="btn-group d-flex" role="group">
|
52
52
|
<%= link_to "Category Details", tutorial_category, class: "btn btn-purple btn-xs" %>
|
@@ -7,32 +7,32 @@
|
|
7
7
|
|
8
8
|
<!-- Form Input Fields -->
|
9
9
|
<div class="form-group field_with_errors">
|
10
|
-
<%= form.label :
|
11
|
-
<%= form.text_field :
|
10
|
+
<%= form.label :post_title, "Tutorial Title" %>
|
11
|
+
<%= form.text_field :post_title, placeholder: "Tutorial Title", class: "form-control" %>
|
12
12
|
</div>
|
13
13
|
|
14
14
|
<div class="form-group field_with_errors">
|
15
|
-
<%= form.label :
|
16
|
-
<%= form.text_area :
|
15
|
+
<%= form.label :post_description, "Tutorial Description" %>
|
16
|
+
<%= form.text_area :post_description, class: "form-control", rows: "10" %>
|
17
17
|
</div>
|
18
18
|
|
19
19
|
<div class="form-group field_with_errors">
|
20
|
-
<%= form.label :
|
21
|
-
<%= form.select( :
|
20
|
+
<%= form.label :post_status, "Tutorial Status" %>
|
21
|
+
<%= form.select( :post_status, [["Draft","draft"],["Published","published"],["Review","review"]], {}, {class: "form-control"}) %>
|
22
22
|
</div>
|
23
23
|
|
24
24
|
<div class="form-group field_with_errors">
|
25
|
-
<%= form.label :
|
26
|
-
<%= form.file_field :
|
25
|
+
<%= form.label :post_image, "Featured Image" %>
|
26
|
+
<%= form.file_field :post_image, class: "form-control" %>
|
27
27
|
</div>
|
28
|
-
<% if form.object.
|
29
|
-
<%= image_tag main_app.url_for(form.object.
|
28
|
+
<% if form.object.post_image.attached? %>
|
29
|
+
<%= image_tag main_app.url_for(form.object.post_image), class: "img-responsive img-thumbnail" %>
|
30
30
|
<% end %>
|
31
31
|
|
32
32
|
<div class="form-group field_with_errors">
|
33
33
|
<label>Select a Category</label>
|
34
34
|
<div class="panel-body">
|
35
|
-
<%= form.collection_check_boxes :category_ids, PhcdevworksTutorials::Tutorial::Category.order(:
|
35
|
+
<%= form.collection_check_boxes :category_ids, PhcdevworksTutorials::Tutorial::Category.order(:category_name), :id, :category_name do |post_category| %>
|
36
36
|
<%= post_category.check_box %>
|
37
37
|
<%= post_category.label %><br>
|
38
38
|
<% end %>
|
@@ -48,9 +48,9 @@
|
|
48
48
|
<tbody>
|
49
49
|
<% @tutorial_posts.each do |tutorial_post| %>
|
50
50
|
<tr>
|
51
|
-
<td><%= tutorial_post.
|
52
|
-
<td><%= tutorial_post.
|
53
|
-
<td><%= tutorial_post.
|
51
|
+
<td><%= tutorial_post.post_title %></td>
|
52
|
+
<td><%= tutorial_post.post_description %></td>
|
53
|
+
<td><%= tutorial_post.post_status.capitalize %></td>
|
54
54
|
<td>
|
55
55
|
<div class="btn-group d-flex" role="group">
|
56
56
|
<%= link_to "Tutorial Details", tutorial_post, class: "btn btn-purple btn-xs" %>
|
@@ -7,23 +7,23 @@
|
|
7
7
|
|
8
8
|
<!-- Form Input Fields -->
|
9
9
|
<div class="form-group field_with_errors">
|
10
|
-
<%= form.label :
|
11
|
-
<%= form.select( :
|
10
|
+
<%= form.label :step_number, "Tutorial Step" %>
|
11
|
+
<%= form.select( :step_number, [["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"],["10","10"],["11","11"],["12","12"],["13","13"],["14","14"]], {}, {class: "form-control"}) %>
|
12
12
|
</div>
|
13
13
|
|
14
14
|
<div class="form-group field_with_errors">
|
15
|
-
<%= form.label :
|
16
|
-
<%= form.text_field :
|
15
|
+
<%= form.label :step_title, placeholder: "Step Title" %>
|
16
|
+
<%= form.text_field :step_title, class: "form-control", rows: "10" %>
|
17
17
|
</div>
|
18
18
|
|
19
19
|
<div class="form-group field_with_errors">
|
20
|
-
<%= form.label :
|
21
|
-
<%= form.text_area :
|
20
|
+
<%= form.label :step_description, "Step Text" %>
|
21
|
+
<%= form.text_area :step_description, class: "form-control", rows: "10" %>
|
22
22
|
</div>
|
23
23
|
|
24
24
|
<div class="form-group field_with_errors">
|
25
|
-
<%= form.label :
|
26
|
-
<%= form.file_field :
|
25
|
+
<%= form.label :step_image, "Step Image" %>
|
26
|
+
<%= form.file_field :step_image, class: "form-control" %>
|
27
27
|
</div>
|
28
28
|
|
29
29
|
<!-- Form Input Fields -->
|
@@ -47,8 +47,8 @@
|
|
47
47
|
<tbody>
|
48
48
|
<% @tutorial_steps.each do |tutorial_step| %>
|
49
49
|
<tr>
|
50
|
-
<td><%= tutorial_step.
|
51
|
-
<td><%= tutorial_step.
|
50
|
+
<td><%= tutorial_step.step_number %></td>
|
51
|
+
<td><%= tutorial_step.step_title %></td>
|
52
52
|
<td>
|
53
53
|
<div class="btn-group d-flex" role="group">
|
54
54
|
<%= link_to "Step Details", tutorial_post_step_path(tutorial_step.post, tutorial_step), class: "btn btn-purple btn-xs" %>
|
data/config/routes.rb
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
PhcdevworksTutorials::Engine.routes.draw do
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
end
|
8
|
-
resources :categories, class_name: "Tutorial::Category"
|
3
|
+
# Tutorial Routs
|
4
|
+
namespace :tutorial do
|
5
|
+
resources :posts, class_name: "Tutorial::Post" do
|
6
|
+
resources :steps, class_name: "Tutorial::Step"
|
9
7
|
end
|
8
|
+
resources :categories, class_name: "Tutorial::Category"
|
9
|
+
end
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
11
|
+
# Frontend Routes
|
12
|
+
namespace :blog do
|
13
|
+
resources :tutorials, only: [:index, :show]
|
14
|
+
end
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
end
|
16
|
+
# API Routes
|
17
|
+
namespace :api, :path => "", :constraints => {:subdomain => "tutorial_api"} do
|
18
|
+
namespace :v1 do
|
19
|
+
resources :posts, defaults: {format: "json"}
|
20
|
+
resources :categories, defaults: {format: "json"}
|
22
21
|
end
|
22
|
+
end
|
23
23
|
|
24
|
-
|
25
|
-
|
24
|
+
# Mount Routes
|
25
|
+
mount PhcdevworksAccounts::Engine, :at => "/"
|
26
26
|
|
27
27
|
end
|
@@ -2,10 +2,10 @@ class CreatePhcdevworksTutorialsTutorialPosts < ActiveRecord::Migration[6.0]
|
|
2
2
|
def change
|
3
3
|
create_table :phcdevworks_tutorials_tutorial_posts do |t|
|
4
4
|
|
5
|
-
t.string :
|
6
|
-
t.string :
|
7
|
-
t.string :
|
8
|
-
t.string :
|
5
|
+
t.string :post_title
|
6
|
+
t.string :post_description
|
7
|
+
t.string :post_status
|
8
|
+
t.string :post_image
|
9
9
|
|
10
10
|
t.string :slug
|
11
11
|
t.string :user_id
|
@@ -2,10 +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.string :
|
6
|
-
t.string :
|
7
|
-
t.string :
|
8
|
-
t.string :
|
5
|
+
t.string :step_number
|
6
|
+
t.string :step_title
|
7
|
+
t.string :step_description
|
8
|
+
t.string :step_image
|
9
9
|
|
10
10
|
t.string :slug
|
11
11
|
t.string :user_id
|
@@ -0,0 +1,19 @@
|
|
1
|
+
class CreatePhcdevworksTutorialsTutorialPostVersions < ActiveRecord::Migration[6.0]
|
2
|
+
TEXT_BYTES = 1_073_741_823
|
3
|
+
def change
|
4
|
+
|
5
|
+
create_table :phcdevworks_tutorials_tutorial_post_versions do |t|
|
6
|
+
|
7
|
+
t.string :item_type, {:null=>false}
|
8
|
+
t.integer :item_id, null: false
|
9
|
+
t.string :event, null: false
|
10
|
+
t.string :whodunnit
|
11
|
+
t.text :object, limit: TEXT_BYTES
|
12
|
+
t.datetime :created_at
|
13
|
+
|
14
|
+
end
|
15
|
+
|
16
|
+
add_index :phcdevworks_tutorials_tutorial_post_versions, %i(item_type item_id), :name => 'tutorial_post_versions'
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
class CreatePhcdevworksTutorialsTutorialStepVersions < ActiveRecord::Migration[6.0]
|
2
|
+
TEXT_BYTES = 1_073_741_823
|
3
|
+
def change
|
4
|
+
|
5
|
+
create_table :phcdevworks_tutorials_tutorial_step_versions do |t|
|
6
|
+
|
7
|
+
t.string :item_type, {:null=>false}
|
8
|
+
t.integer :item_id, null: false
|
9
|
+
t.string :event, null: false
|
10
|
+
t.string :whodunnit
|
11
|
+
t.text :object, limit: TEXT_BYTES
|
12
|
+
t.datetime :created_at
|
13
|
+
|
14
|
+
end
|
15
|
+
|
16
|
+
add_index :phcdevworks_tutorials_tutorial_step_versions, %i(item_type item_id), :name => 'tutorial_step_versions'
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
class CreatePhcdevworksTutorialsTutorialCategoryVersions < ActiveRecord::Migration[6.0]
|
2
|
+
TEXT_BYTES = 1_073_741_823
|
3
|
+
def change
|
4
|
+
|
5
|
+
create_table :phcdevworks_tutorials_tutorial_category_versions do |t|
|
6
|
+
|
7
|
+
t.string :item_type, {:null=>false}
|
8
|
+
t.integer :item_id, null: false
|
9
|
+
t.string :event, null: false
|
10
|
+
t.string :whodunnit
|
11
|
+
t.text :object, limit: TEXT_BYTES
|
12
|
+
t.datetime :created_at
|
13
|
+
|
14
|
+
end
|
15
|
+
|
16
|
+
add_index :phcdevworks_tutorials_tutorial_category_versions, %i(item_type item_id), :name => 'tutorial_category_versions'
|
17
|
+
end
|
18
|
+
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:
|
4
|
+
version: 5.0.1
|
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-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -273,11 +273,13 @@ files:
|
|
273
273
|
- app/jobs/phcdevworks_tutorials/application_job.rb
|
274
274
|
- app/mailers/phcdevworks_tutorials/application_mailer.rb
|
275
275
|
- app/models/phcdevworks_tutorials/application_record.rb
|
276
|
-
- app/models/phcdevworks_tutorials/category.rb
|
277
276
|
- app/models/phcdevworks_tutorials/tutorial.rb
|
278
277
|
- app/models/phcdevworks_tutorials/tutorial/category.rb
|
279
278
|
- app/models/phcdevworks_tutorials/tutorial/post.rb
|
280
279
|
- app/models/phcdevworks_tutorials/tutorial/step.rb
|
280
|
+
- app/models/phcdevworks_tutorials/tutorial_category_versions.rb
|
281
|
+
- app/models/phcdevworks_tutorials/tutorial_post_versions.rb
|
282
|
+
- app/models/phcdevworks_tutorials/tutorial_step_versions.rb
|
281
283
|
- app/views/layouts/phcdevworks_tutorials/application.html.erb
|
282
284
|
- app/views/layouts/phcdevworks_tutorials/components/backend/footer/_footer.html.erb
|
283
285
|
- app/views/layouts/phcdevworks_tutorials/components/backend/navigation/_top_menu.html.erb
|
@@ -301,10 +303,13 @@ files:
|
|
301
303
|
- app/views/phcdevworks_tutorials/tutorial/steps/new.html.erb
|
302
304
|
- app/views/phcdevworks_tutorials/tutorial/steps/show.html.erb
|
303
305
|
- config/routes.rb
|
304
|
-
- db/migrate/20191003235303_create_join_table_categories_posts.rb
|
305
306
|
- db/migrate/20191017235259_create_phcdevworks_tutorials_tutorial_posts.rb
|
306
307
|
- db/migrate/20191017235421_create_phcdevworks_tutorials_tutorial_steps.rb
|
307
308
|
- db/migrate/20191018124910_create_phcdevworks_tutorials_tutorial_categories.rb
|
309
|
+
- db/migrate/20191024232406_create_phcdevworks_tutorials_categories_posts.rb
|
310
|
+
- db/migrate/20191102093129_create_phcdevworks_tutorials_tutorial_post_versions.rb
|
311
|
+
- db/migrate/20191102093146_create_phcdevworks_tutorials_tutorial_step_versions.rb
|
312
|
+
- db/migrate/20191102093157_create_phcdevworks_tutorials_tutorial_category_versions.rb
|
308
313
|
- lib/phcdevworks_tutorials.rb
|
309
314
|
- lib/phcdevworks_tutorials/engine.rb
|
310
315
|
- lib/phcdevworks_tutorials/version.rb
|