phcpresspro 12.0.2 → 12.1.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
  SHA1:
3
- metadata.gz: aa07274ed85df2c50981ec5e47cc699118c7cb36
4
- data.tar.gz: cea650a296c31bfebe28447791364a66a868bf8a
3
+ metadata.gz: 8a3d8a2e0c1489e9430c47a607a32bcd6c7e1db3
4
+ data.tar.gz: 06677564ba19e73a4472276dcb3c186efbede1e0
5
5
  SHA512:
6
- metadata.gz: 76e2d5a41d70ba155d865ea5f0dd6e2ebd33b43e416237c1efca295d6b08dcb65c39f616c1bfbcdea20e94e4bac72e6d19ea6ec62409c13a695b4a6251618290
7
- data.tar.gz: 1d900d244edf0fc5e46304807dcc383a3c677a811ad26c673c32bd1374af246482e66f4c93b22101e13cb25dcc205502c71e9aa7e6b3255dddbde2817d346a19
6
+ metadata.gz: b7cccafafa6339020fca409a17b1024db9e2f4c7955881db67a1a1d7a705707c7ea537fda1b8d9e932c3a52e6559fd68e0809d51f5ce0d5f67988b556c17374d
7
+ data.tar.gz: 49bbc7901f76a129012634806d555ed5bc931d57de6f1c75479567747bd7b6335da06a7452140caf7cc306ecca5162e63398f2e1c523271063250bbcaa5427d2
@@ -15,6 +15,7 @@ module Phcpresspro
15
15
 
16
16
  # Article Show
17
17
  def show
18
+ @articles_post = Articles::Post.friendly.find(params[:id])
18
19
  end
19
20
 
20
21
  # Article New
@@ -70,7 +71,7 @@ module Phcpresspro
70
71
 
71
72
  # Params Whitelist
72
73
  def articles_post_params
73
- params.require(:articles_post).permit(:psttitle, :psttext, :pststatus, :pstimage, :remove_pstimage, :user_name, :user_id, :membership_id, :oganization_id, category_ids: [])
74
+ params.require(:articles_post).permit(:psttitle, :psttext, :pststatus, :pstimage, :remove_pstimage, :slug, :user_id, :user_name, :membership_id, :oganization_id, category_ids: [])
74
75
  end
75
76
 
76
77
  end
@@ -13,7 +13,7 @@ module Phcpresspro
13
13
 
14
14
  # Single Article Post
15
15
  def show
16
- @articles_single = Articles::Post.where(pststatus: "published").find(params[:id])
16
+ @articles_single = Articles::Post.where(pststatus: "published").friendly.find(params[:id])
17
17
  end
18
18
 
19
19
  end
@@ -15,6 +15,7 @@ module Phcpresspro
15
15
 
16
16
  # Categories Show
17
17
  def show
18
+ @modules_category = Modules::Category.friendly.find(params[:id])
18
19
  end
19
20
 
20
21
  # Categories New
@@ -68,7 +69,7 @@ module Phcpresspro
68
69
 
69
70
  # Whitelist
70
71
  def modules_category_params
71
- params.require(:modules_category).permit(:catname, :user_name, :user_id, :membership_id, :oganization_id)
72
+ params.require(:modules_category).permit(:catname, :slug, :user_id, :user_name, :membership_id, :oganization_id)
72
73
  end
73
74
 
74
75
  end
@@ -15,6 +15,7 @@ module Phcpresspro
15
15
 
16
16
  # Connections Show
17
17
  def show
18
+ @modules_connection = Modules::Connection.friendly.find(params[:id])
18
19
  end
19
20
 
20
21
  # Connections New
@@ -68,7 +69,7 @@ module Phcpresspro
68
69
 
69
70
  # Whitelist
70
71
  def modules_connection_params
71
- params.require(:modules_connection).permit(:post_id, :category_id, :user_name, :user_id, :membership_id, :oganization_id)
72
+ params.require(:modules_connection).permit(:post_id, :category_id, :slug, :user_id, :user_name, :membership_id, :oganization_id)
72
73
  end
73
74
 
74
75
  end
@@ -1,6 +1,9 @@
1
1
  module Phcpresspro
2
2
  class Articles::Post < ApplicationRecord
3
3
 
4
+ # Clean URL Initialize
5
+ extend FriendlyId
6
+
4
7
  # For Image Uploads
5
8
  mount_uploader :pstimage, Phcpresspro::PstimageUploader
6
9
 
@@ -10,15 +13,18 @@ module Phcpresspro
10
13
 
11
14
  # Validation for Form Fields
12
15
  validates :psttitle,
13
- presence: true,
16
+ presence: true,
14
17
  length: { minimum: 3 }
15
18
 
16
19
  validates :psttext,
17
- presence: true,
20
+ presence: true,
18
21
  length: { minimum: 3 }
19
22
 
20
23
  validates :pststatus,
21
- presence: true
24
+ presence: true
25
+
26
+ # Clean URL Define
27
+ friendly_id :psttitle, use: :slugged
22
28
 
23
29
  end
24
30
  end
@@ -1,14 +1,20 @@
1
1
  module Phcpresspro
2
2
  class Modules::Category < ApplicationRecord
3
3
 
4
+ # Clean URL Initialize
5
+ extend FriendlyId
6
+
4
7
  # Relationships
5
8
  has_many :connections, class_name: 'Phcpresspro::Modules::Connection', dependent: :destroy
6
9
  has_many :posts, class_name: 'Phcpresspro::Modules::Category', :through => :connections
7
10
 
8
11
  # Validation for Form Fields
9
12
  validates :catname,
10
- presence: true,
11
- length: { minimum: 3 }
13
+ presence: true,
14
+ length: { minimum: 3 }
15
+
16
+ # Clean URL Define
17
+ friendly_id :catname, use: :slugged
12
18
 
13
19
  end
14
20
  end
@@ -1,10 +1,15 @@
1
1
  module Phcpresspro
2
2
  class Modules::Connection < ApplicationRecord
3
3
 
4
- # Relationships
4
+ # Clean URL Initialize
5
+ extend FriendlyId
5
6
 
7
+ # Relationships
6
8
  belongs_to :post, class_name: 'Phcpresspro::Articles::Post'
7
9
  belongs_to :category, class_name: 'Phcpresspro::Modules::Category'
8
10
 
11
+ # Clean URL Define
12
+ friendly_id :id, use: :slugged
13
+
9
14
  end
10
15
  end
@@ -4,5 +4,5 @@
4
4
  <% end %>
5
5
  </div>
6
6
  <div>
7
- &copy; 2012-<%= Time.now.year %> - v12.0.2 - RELEASED - MAY-11-<%= Date.today.year %>
7
+ &copy; 2012-<%= Time.now.year %> - v12.1.0 - RELEASED - MAY-11-<%= Date.today.year %>
8
8
  </div>
@@ -1,3 +1,3 @@
1
1
  module Phcpresspro
2
- VERSION = "12.0.2"
2
+ VERSION = "12.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phcpresspro
3
3
  version: !ruby/object:Gem::Version
4
- version: 12.0.2
4
+ version: 12.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - BradPotts