caboose-cms 0.4.128 → 0.4.129
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/app/models/caboose/page.rb +10 -2
- data/lib/caboose/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NDAzMTMyODQzZjVkNzU4ZjZjZDZmOTVjNTBlZGQ1ZjQ1Yzg3NmZjZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZTE3YmViNWZlMDAzMWMwNTA1NDI5MmEyNzY0NWZiMzMzNTI2MWMzNQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZDYxOTE0MGZiMzE2MTBiMDRiYTk1Yjc5MjAxY2Q3MWQyNjhmZjkwYTc4ZWI1
|
10
|
+
YzRkMmZhNTRjZWU3ZTY2ZTFlZjlmZTMwNDdjM2YxNTBiNTY0MjUzNDJlYmZi
|
11
|
+
MWIyOGQ1YWJjOTAyNzhjZmNmOGQ5ZmU0OWUyZTA3MDdjYWIyMTQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NmNkOTA4ZTA4Njg3MDEyNGEzNDk3ZDVjZjcyMWU4MzEyZTlhOGZlZWQ3Y2Uz
|
14
|
+
OTJmZTA4NGQ1ZTM3YjMwMDkxOWY1NjAxNmZlNjNhYzNkYjVlYzMyNTZmYTk0
|
15
|
+
YWJmY2M3NzZmNDdjNTgxNTlmYjUxZjY0NDQwNTc1ZTA5MDhlZDY=
|
data/app/models/caboose/page.rb
CHANGED
@@ -293,9 +293,9 @@ class Caboose::Page < ActiveRecord::Base
|
|
293
293
|
|
294
294
|
path = []
|
295
295
|
arr.each do |row|
|
296
|
-
if
|
296
|
+
if row.alias && row.alias.strip.length > 0
|
297
297
|
path = [row.alias]
|
298
|
-
elsif
|
298
|
+
elsif row.slug && row.slug.strip.length > 0
|
299
299
|
path << row.slug
|
300
300
|
end
|
301
301
|
end
|
@@ -312,6 +312,10 @@ class Caboose::Page < ActiveRecord::Base
|
|
312
312
|
self.url_helper(p.parent_id, arr)
|
313
313
|
end
|
314
314
|
|
315
|
+
def url
|
316
|
+
return Caboose::Page.url(self.id)
|
317
|
+
end
|
318
|
+
|
315
319
|
def self.slug(str)
|
316
320
|
return str.downcase.gsub(' ', '-').gsub(/[^\w-]/, '')
|
317
321
|
end
|
@@ -348,5 +352,9 @@ class Caboose::Page < ActiveRecord::Base
|
|
348
352
|
str << "#{self.title} | " if !self.title.nil? && self.title.strip.length > 0
|
349
353
|
str << self.site.description if self.site && self.site.description
|
350
354
|
end
|
355
|
+
|
356
|
+
def self.pages_with_tag(parent_id, tag)
|
357
|
+
self.includes(:page_tags).where(:hide => false, :parent_id => 1, :page_tags => { :tag => tag }).reorder('sort_order, title').all
|
358
|
+
end
|
351
359
|
|
352
360
|
end
|
data/lib/caboose/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: caboose-cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.129
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Barry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|