phcdevworks_tutorials 3.0.0 → 4.0.0

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
  SHA256:
3
- metadata.gz: d73bfa6d1cf3e314aa938a5a67ce544c7899b2d56b19afcb0a147354216eb704
4
- data.tar.gz: c8fa6aafa79e2504e5709718a727c44214ad5dba8acab50cf745eb7d7855c66e
3
+ metadata.gz: 5b899d94a785c234b3d0ce62692b41b83a5587d6d575fdea8d695ca4b7193dac
4
+ data.tar.gz: 74920ac5eec073d6478121ed3e8db5b07a79c54a522f50558d5cd10bc5d40de2
5
5
  SHA512:
6
- metadata.gz: 201a7c24fe3acd7d3f83648ce8e46da7c09ac03e90d700df9d34c50ca8178120b55a3892959c6dc529fb423bf493dc9ad58459f2cb021e2f2cabbec15460a610
7
- data.tar.gz: 5b28edd1312dd7a228514e983968730ad52b79daa7bb0b4a35ecf159d1ee654ca97f8fec2ae7dc168f6ca961a55bfd1a6b4e26a90d1425e98a35b35b4f52f5ff
6
+ metadata.gz: 77f565f907e0e6e277ebd10704059dbb990a00edeb30107757bf25edcc9f6cf2fe6f81456d12649674c0436ef53562fc9a2357207448c5051c05caf9a6b93708
7
+ data.tar.gz: 3d63b438fc6d1fa743b6d4f59d3e65e03b9985c29bd319323108971220924722cbf5b0732c0529370d39bab118ff4f58f19fa1f752c25282235ec56c0c623ed8
@@ -74,7 +74,7 @@ module PhcdevworksTutorials
74
74
 
75
75
  # Whitelist
76
76
  def tutorial_category_params
77
- params.require(:tutorial_category).permit(:tutorial_category_name, :slug, :user_id, :org_id)
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(:tutorial_post_title, :tutorial_post_description, :tutorial_post_status, :tutorial_post_image, :slug, :user_id, :org_id, category_ids: [])
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
@@ -82,7 +82,7 @@ module PhcdevworksTutorials
82
82
 
83
83
  # Whitelist
84
84
  def tutorial_step_params
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)
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
@@ -8,7 +8,7 @@ module PhcdevworksTutorials
8
8
  has_and_belongs_to_many :posts, class_name: "Tutorial::Post", :join_table => "phcdevworks_tutorials_categories_posts", :dependent => :destroy
9
9
 
10
10
  # Form Fields Validation
11
- validates :tutorial_category_name,
11
+ validates :category_name,
12
12
  presence: true,
13
13
  uniqueness: true
14
14
 
@@ -16,7 +16,7 @@ module PhcdevworksTutorials
16
16
  friendly_id :phcdev_tutorials_category_nice_urls, use: [:slugged, :finders]
17
17
 
18
18
  def phcdev_tutorials_category_nice_urls
19
- [:tutorial_category_name]
19
+ [:category_name]
20
20
  end
21
21
 
22
22
  end
@@ -5,7 +5,7 @@ module PhcdevworksTutorials
5
5
  extend FriendlyId
6
6
 
7
7
  # Image Upload
8
- has_one_attached :tutorial_post_image
8
+ has_one_attached :post_image
9
9
 
10
10
  # Relationships
11
11
  has_and_belongs_to_many :categories, class_name: "Tutorial::Category", :join_table => "phcdevworks_tutorials_categories_posts", :dependent => :destroy
@@ -13,17 +13,17 @@ module PhcdevworksTutorials
13
13
  belongs_to :user, class_name: "PhcdevworksAccounts::User"
14
14
 
15
15
  # Form Fields Validation
16
- validates :tutorial_post_title,
16
+ validates :post_title,
17
17
  presence: true
18
18
 
19
- validates :tutorial_post_description,
19
+ validates :post_description,
20
20
  presence: true
21
21
 
22
22
  # Clean URL Define
23
- friendly_id :phcdev_tutorials_post_nice_urls, use: [:slugged, :finders]
23
+ friendly_id :phcdev_tutorial_post_nice_urls, use: [:slugged, :finders]
24
24
 
25
- def phcdev_tutorials_post_nice_urls
26
- [:tutorial_post_title]
25
+ def phcdev_tutorial_post_nice_urls
26
+ [:post_title]
27
27
  end
28
28
 
29
29
  end
@@ -7,8 +7,8 @@
7
7
 
8
8
  <!-- Form Input Fields -->
9
9
  <div class="form-group field_with_errors">
10
- <%= form.label :tutorial_category_name, "Tutorial Category" %>
11
- <%= form.text_field :tutorial_category_name, placeholder: "Category Name", class: "form-control" %>
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.tutorial_category_name %></td>
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" %>
@@ -2,7 +2,7 @@
2
2
 
3
3
  <p>
4
4
  <strong>Tutorial category name:</strong>
5
- <%= @tutorial_category.tutorial_category_name %>
5
+ <%= @tutorial_category.category_name %>
6
6
  </p>
7
7
 
8
8
  <%= link_to 'Edit', edit_tutorial_category_path(@tutorial_category) %> |
@@ -7,32 +7,32 @@
7
7
 
8
8
  <!-- Form Input Fields -->
9
9
  <div class="form-group field_with_errors">
10
- <%= form.label :tutorial_post_title, "Tutorial Title" %>
11
- <%= form.text_field :tutorial_post_title, placeholder: "Tutorial Title", class: "form-control" %>
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 :tutorial_post_description, "Tutorial Description" %>
16
- <%= form.text_area :tutorial_post_description, class: "form-control", rows: "10" %>
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 :tutorial_post_status, "Tutorial Status" %>
21
- <%= form.select( :tutorial_post_status, [["Draft","draft"],["Published","published"],["Review","review"]], {}, {class: "form-control"}) %>
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 :tutorial_post_image, "Featured Image" %>
26
- <%= form.file_field :tutorial_post_image, class: "form-control" %>
25
+ <%= form.label :post_image, "Featured Image" %>
26
+ <%= form.file_field :post_image, class: "form-control" %>
27
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" %>
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(:tutorial_category_name), :id, :tutorial_category_name do |post_category| %>
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.tutorial_post_title %></td>
52
- <td><%= tutorial_post.tutorial_post_description %></td>
53
- <td><%= tutorial_post.tutorial_post_status.capitalize %></td>
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 :tutorial_step_number, "Tutorial Step" %>
11
- <%= form.select( :tutorial_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"}) %>
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 :tutorial_step_title, placeholder: "Step Title" %>
16
- <%= form.text_field :tutorial_step_title, class: "form-control", rows: "10" %>
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 :tutorial_step_description, "Step Text" %>
21
- <%= form.text_area :tutorial_step_description, class: "form-control", rows: "10" %>
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 :tutorial_step_image, "Step Image" %>
26
- <%= form.file_field :tutorial_step_image, class: "form-control" %>
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.tutorial_step_number %></td>
51
- <td><%= tutorial_step.tutorial_step_title %></td>
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" %>
@@ -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 :tutorial_post_title
6
- t.string :tutorial_post_description
7
- t.string :tutorial_post_status
8
- t.string :tutorial_post_image
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 :tutorial_step_number
6
- t.string :tutorial_step_title
7
- t.string :tutorial_step_description
8
- t.string :tutorial_step_image
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
@@ -2,7 +2,7 @@ class CreatePhcdevworksTutorialsTutorialCategories < ActiveRecord::Migration[6.0
2
2
  def change
3
3
  create_table :phcdevworks_tutorials_tutorial_categories do |t|
4
4
 
5
- t.string :tutorial_category_name
5
+ t.string :category_name
6
6
 
7
7
  t.string :slug
8
8
  t.string :user_id
@@ -1,3 +1,3 @@
1
1
  module PhcdevworksTutorials
2
- VERSION = "3.0.0"
2
+ VERSION = "4.0.0"
3
3
  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: 3.0.0
4
+ version: 4.0.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-10-25 00:00:00.000000000 Z
11
+ date: 2019-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails