guts 1.3.5 → 1.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/app/models/guts/category.rb +6 -0
- data/app/models/guts/content.rb +6 -0
- data/app/models/guts/group.rb +9 -3
- data/app/models/guts/navigation.rb +6 -0
- data/app/models/guts/type.rb +6 -0
- data/app/views/guts/categories/_form.html.erb +1 -1
- data/app/views/guts/contents/_form.html.erb +1 -1
- data/app/views/guts/groups/_form.html.erb +1 -1
- data/app/views/guts/navigations/_form.html.erb +1 -1
- data/app/views/guts/types/_form.html.erb +1 -1
- data/lib/guts/version.rb +1 -1
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +1644 -0
- data/test/dummy/log/test.log +6999 -0
- data/test/dummy/public/system/guts/media/166/075/618/compact/spongebob.png +0 -0
- data/test/dummy/public/system/guts/media/166/075/618/grande/spongebob.png +0 -0
- data/test/dummy/public/system/guts/media/166/075/618/large/spongebob.png +0 -0
- data/test/dummy/public/system/guts/media/166/075/618/medium/spongebob.png +0 -0
- data/test/dummy/public/system/guts/media/166/075/618/small/spongebob.png +0 -0
- data/test/dummy/public/system/guts/media/166/075/618/supreme/spongebob.png +0 -0
- data/test/dummy/public/system/guts/media/166/075/618/thumb/spongebob.png +0 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 43a804bb1b0e10df20411d3be89d6ac3d313b10a
|
4
|
+
data.tar.gz: 5b29faed67dfed3d49148a6af0d003c3db014906
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00406b4fffa6a01b200c585c2cbe70eeb770995f05360ecf9cffb8343f3f19fbf5bb502fe5306b57ea72af891413169181ad29237d64d924601ce721f1fdfd36
|
7
|
+
data.tar.gz: c20fc0c304498b76773d234b64ec82cfa2596995dfd9cd6309bd17bf90627f77ad34564d0ea2a413a88e4e789ac4a93a9eb3e3e108e11f1c76968a86603066ce
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
# Version 1.3.6
|
2
|
+
|
3
|
+
+ Added methods to models for friendly_id so the slugs will update on title change.. previously, slugs would not update
|
4
|
+
+ Slug fields on all forms now are `readonly` and `disabled`
|
5
|
+
|
1
6
|
# Version 1.3.5
|
2
7
|
|
3
8
|
+ Added ENV var for TravisCI to surpress unneeded Ruby warnings
|
data/app/models/guts/category.rb
CHANGED
@@ -18,5 +18,11 @@ module Guts
|
|
18
18
|
friendly_id :title, use: [:slugged, :scoped, :finders], scope: :site_id
|
19
19
|
navigatable :title, format: ':title'
|
20
20
|
trackable :create, :update, :destroy, fields: [:title, :slug]
|
21
|
+
|
22
|
+
# Updates slug if title changes
|
23
|
+
# @return [Boolean]
|
24
|
+
def should_generate_new_friendly_id?
|
25
|
+
title_changed?
|
26
|
+
end
|
21
27
|
end
|
22
28
|
end
|
data/app/models/guts/content.rb
CHANGED
@@ -21,5 +21,11 @@ module Guts
|
|
21
21
|
friendly_id :title, use: [:slugged, :scoped, :finders], scope: :site_id
|
22
22
|
navigatable :'type.title', :title, format: '[:type.title] :title'
|
23
23
|
trackable :create, :update, :destroy, fields: [:title, :visible, :tags, :slug]
|
24
|
+
|
25
|
+
# Updates slug if title changes
|
26
|
+
# @return [Boolean]
|
27
|
+
def should_generate_new_friendly_id?
|
28
|
+
title_changed?
|
29
|
+
end
|
24
30
|
end
|
25
31
|
end
|
data/app/models/guts/group.rb
CHANGED
@@ -3,16 +3,22 @@ module Guts
|
|
3
3
|
class Group < ActiveRecord::Base
|
4
4
|
extend FriendlyId
|
5
5
|
include TrackableConcern
|
6
|
-
|
6
|
+
|
7
7
|
validates :title, presence: true, length: { minimum: 3 }
|
8
|
-
|
8
|
+
|
9
9
|
has_many :user_groups
|
10
10
|
has_many :users, through: :user_groups
|
11
11
|
has_many :media, as: :filable, dependent: :destroy
|
12
12
|
has_many :metafields, as: :fieldable, dependent: :destroy
|
13
13
|
has_many :tracks, as: :object
|
14
|
-
|
14
|
+
|
15
15
|
friendly_id :title, use: [:slugged, :finders]
|
16
16
|
trackable :create, :update, :destroy, fields: [:title]
|
17
|
+
|
18
|
+
# Updates slug if title changes
|
19
|
+
# @return [Boolean]
|
20
|
+
def should_generate_new_friendly_id?
|
21
|
+
title_changed?
|
22
|
+
end
|
17
23
|
end
|
18
24
|
end
|
@@ -15,5 +15,11 @@ module Guts
|
|
15
15
|
|
16
16
|
friendly_id :title, use: [:slugged, :scoped, :finders], scope: :site_id
|
17
17
|
trackable :create, :update, :destroy, fields: [:title]
|
18
|
+
|
19
|
+
# Updates slug if title changes
|
20
|
+
# @return [Boolean]
|
21
|
+
def should_generate_new_friendly_id?
|
22
|
+
title_changed?
|
23
|
+
end
|
18
24
|
end
|
19
25
|
end
|
data/app/models/guts/type.rb
CHANGED
@@ -16,5 +16,11 @@ module Guts
|
|
16
16
|
friendly_id :title, use: [:slugged, :scoped, :finders], scope: :site_id
|
17
17
|
navigatable :title, format: ':title'
|
18
18
|
trackable :create, :update, :destroy, fields: [:title]
|
19
|
+
|
20
|
+
# Updates slug if title changes
|
21
|
+
# @return [Boolean]
|
22
|
+
def should_generate_new_friendly_id?
|
23
|
+
title_changed?
|
24
|
+
end
|
19
25
|
end
|
20
26
|
end
|
data/lib/guts/version.rb
CHANGED
Binary file
|
data/test/dummy/db/test.sqlite3
CHANGED
Binary file
|