petrie 0.1.0 → 0.1.1

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: c2f982b5b6f5fe93469c996c6e85f2a065747275
4
- data.tar.gz: 78ac53d9b480a551982299ad6486576070e15ba8
3
+ metadata.gz: da9f08cdff2520b7dc307b54a72dca682e079631
4
+ data.tar.gz: 293896af6ae9f4ba2715c00d388ecc10e56ba982
5
5
  SHA512:
6
- metadata.gz: 14b9ed395b01bb8a33d335307137eee9f913d5f237e6f09246d6392d66f8cdf45b9b35573f347b3da351c4b76e46a88bf85c572bd8f4a2185f9aa2ff1fa10973
7
- data.tar.gz: ea6c1e3c618bfed7761da95523a399d78aad54960126627f022dbac1b1b53d33ff963b6a2ee064be409a5b605170e5a344cc069fb50d6ccadd698f9e67c1e23c
6
+ metadata.gz: d09577468c323cc83b32b0819e18412f7dc8d3e30bb1b627f3d7837186d6cd7f314f17f37ffad777564d50c3ef3c705e4db55dacfe3b993ae6a1e5a0c537906b
7
+ data.tar.gz: 069be96b2803f604bc39b828478bce9fc30bf805b51b20f1301d63e91f6813bfbe5d9b95362871c8609223829ac16efc2a6f7329a82aabb35b9e935b93af045a
data/README.md CHANGED
@@ -19,12 +19,18 @@ Then run the installer
19
19
 
20
20
  ## ActiveAdmin
21
21
 
22
+ **Heads up!** You need to have ActiveAdmin installed first!
23
+
22
24
  rails g petrie:activeadmin
23
25
 
24
26
  # Caution
25
27
 
26
28
  Petrie includes a root route to `pages#home`. Generally, this shouldn't be a problem unless you don't want to use a marketing home page as your root.
27
29
 
30
+ # Known issues
31
+
32
+ * There are missing blocks in sir-trevor-rails that will cause template errors. The workaround is to create these blocks in your application in `app/views/sir-trevor/blocks` until this gets fixed.
33
+
28
34
  ## License
29
35
 
30
36
  MIT License
@@ -4,17 +4,22 @@ module Petrie
4
4
  class PagesController < ApplicationController
5
5
  rescue_from ActiveRecord::RecordNotFound, with: :not_found
6
6
 
7
+ before_filter :assign_page
8
+
7
9
  def home
8
10
  end
9
11
 
10
12
  def show
11
- @page = find_by_slug
12
13
  end
13
14
 
14
15
  private
15
16
 
17
+ def assign_page
18
+ @page = find_by_slug
19
+ end
20
+
16
21
  def find_by_slug
17
- page_slugs = params[:page].split(/\//).reverse
22
+ page_slugs = (params[:page] || 'home').split(/\//).reverse
18
23
  candidates = Page.where(slug: page_slugs.first)
19
24
 
20
25
  return not_found if candidates.empty?
@@ -1,3 +1,3 @@
1
1
  module Petrie
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: petrie
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nic Aitch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-04 00:00:00.000000000 Z
11
+ date: 2013-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails