caboose-cms 0.4.134 → 0.4.135

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NzFhY2YyZjgxNmYzNjBjYjNiYzY5N2YxN2VjMGMwZjNkZDNiNmNmNQ==
4
+ NjU1MzAzNzhkZDYxMDhmMzNkZDcwYjNlNDkwOGEwZjc1MWE2NWUxMA==
5
5
  data.tar.gz: !binary |-
6
- NTkyZTQxOGE3NmY2ZmVjMjBiYjIyMzIzMTE3NTdkZmM5MDdjY2RlNw==
6
+ ZDY3YjUyOTViYjIyZTg5MDVmYWNiZmMyYWVhMWFhNDFhZGNlOWZhZQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NjEwY2JmNzJkZjYzNjRhMWVkZGE4YjMyMmMyNDdmZDBiMDlmZTFmYjFhMjI2
10
- MmNkODk2MDJkNzhhZWRjYTk4NjU1YjAyNGMyNjAwMmQ5Yzg2MWEwN2RjNzc2
11
- NmQ2OTQyZWZhNzQ0MTAyOTY4NTliN2Y4YTM5MjEzMDFjZjlmM2I=
9
+ NjA3ZGY4OTQxNmFhYjA5NDYxMmYzMjI3ZDRmNjg1YWQ5MTBlMDNhNDQxNTVl
10
+ ZGY0MWNiMjQzMzUwODg2YjE4YmRmMDgwYzI1YzJmNGU5M2IxYmQ2MDM1MTI4
11
+ NTI0NTNiNmQwNzkxYzQ5YzA1N2NmYzhjMDg5ZjhiNTEwNTFmYmE=
12
12
  data.tar.gz: !binary |-
13
- MThkYmQ5OTVjYzMzMzg2NDk5ZDEwYTAxZDBiYTY3NDFjYWMwOWM0ZGIzNDEx
14
- ZjJkODRlZWMyNGIxNDAzMTFkYTc3ZDM4MWE0MjFiOGU3MzUxMjJlZjZiYTM3
15
- ZGJkM2VkOTdlMmY5YmNiOWQxODA3MjA0NWM4ZWExYzYwN2MwNDQ=
13
+ NmYyY2M2N2RhYjljOWE3Nzc0YTQzY2IwYjc1NThiNTdiNTFmZGM2Mjk2YTcw
14
+ Y2E0NGQ3MzI3ZGE3ZjEwMTk3MGVlZGViNjZmODEyN2U1ZDEwMjJlZDk4MjZl
15
+ ZGUzNjM4MDY4MDA4YTU3ZTQ2OGE3ZDI2ZDdmOWFiNjQ5ODhjNDU=
@@ -291,9 +291,12 @@ class Caboose::Page < ActiveRecord::Base
291
291
  self.url_helper(page_id, arr)
292
292
  arr.reverse!
293
293
 
294
+ ru = arr.last.redirect_url
295
+ return ru if ru && ru.strip.length > 0
296
+
294
297
  path = []
295
298
  arr.each do |row|
296
- if row.alias && row.alias.strip.length > 0
299
+ if row.alias && row.alias.strip.length > 0
297
300
  path = [row.alias]
298
301
  elsif row.slug && row.slug.strip.length > 0
299
302
  path << row.slug
@@ -305,7 +308,7 @@ class Caboose::Page < ActiveRecord::Base
305
308
  def self.url_helper(page_id, arr)
306
309
  return if page_id <= 0
307
310
 
308
- p = self.find_with_fields(page_id, [:id, :parent_id, :title, :menu_title, :alias, :slug])
311
+ p = self.find_with_fields(page_id, [:id, :parent_id, :title, :menu_title, :alias, :slug, :redirect_url])
309
312
  return if p.nil?
310
313
 
311
314
  arr << p
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.4.134'
2
+ VERSION = '0.4.135'
3
3
  end
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.134
4
+ version: 0.4.135
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-06 00:00:00.000000000 Z
11
+ date: 2014-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails