constructor-pages 0.8.8 → 0.8.10

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: 512fe5c1d1eed0358e55a783ecb0f190749f46de
4
- data.tar.gz: 30a492cb226e2d4f76ba2401a073cb69e2540122
3
+ metadata.gz: b70eda4fd5fcb2d23a8c9b32d834fae54246eae1
4
+ data.tar.gz: df4c7093619676dccf654d018defd5673323378c
5
5
  SHA512:
6
- metadata.gz: bd8c5caa49e94203bd8406e2577792d66152a013c61774c314ffc5001b518a5c103ab52e9a2fe867df7573dae1d3d25ad8da4c9905275828c3c971015b388b65
7
- data.tar.gz: e909538576bf876637142e9fb1ec4afae15878b51c1453cf3431644ca86dcd84b98956eec8d804f87cc5fbbf70dd83b4ed93a570c8f3396ccc02478acd6aceee
6
+ metadata.gz: c6ea73ae7243250710ed3ff762f09941a68d97384f5d8874256a128775789f5f68aba93d2bf1567a35c0be713ee2ac221d23b896ff664286dfb4b1d2d8d2fd14
7
+ data.tar.gz: aa2703c311dbefad66bfb71b47745d3e1642e8e7d6545cecac32736336c368cdd8f5dadf47ffb3fa8225829a4a65222fc26ad12db46072144e122bc6eae9d40e
@@ -20,8 +20,9 @@ module ConstructorPages
20
20
  end
21
21
 
22
22
  def show
23
- @page = Page.find_by_request_or_first("/#{params[:all]}")
24
- error_404 and return unless @page.try(:published?)
23
+ _request = "/#{params[:all]}"
24
+ @page = Page.find_by_request_or_first(_request)
25
+ error_404 and return if @page.nil? or (!@page.published? and _request != '/')
25
26
  redirect_to @page.link if @page.redirect?
26
27
  _code_name = @page.template.code_name
27
28
  instance_variable_set('@'+_code_name, @page)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: constructor-pages
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.8
4
+ version: 0.8.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Zotov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-17 00:00:00.000000000 Z
11
+ date: 2013-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: constructor-core
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.8.8
19
+ version: 0.8.10
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.8.8
26
+ version: 0.8.10
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: dragonfly
29
29
  requirement: !ruby/object:Gem::Requirement