qwerty 0.0.4.pre → 0.0.5.pre
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/documents_controller.rb +10 -2
- data/lib/qwerty/version.rb +1 -1
- metadata +27 -24
@@ -7,14 +7,14 @@ class DocumentsController < QwertyBaseController
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def show
|
10
|
-
path =
|
10
|
+
path = permalink_path || home_path || request.path
|
11
11
|
@document = Document.public.find_by_permalink!(path)
|
12
12
|
prepare_view_environment
|
13
13
|
render locate_template(@document)
|
14
14
|
end
|
15
15
|
|
16
16
|
private
|
17
|
-
|
17
|
+
|
18
18
|
def prepare_view_environment
|
19
19
|
# e.g @blog
|
20
20
|
instance_variable_set("@#{@document.node_name}", @document)
|
@@ -66,4 +66,12 @@ class DocumentsController < QwertyBaseController
|
|
66
66
|
end
|
67
67
|
raise NoTemplateFound
|
68
68
|
end
|
69
|
+
|
70
|
+
def permalink_path
|
71
|
+
params[:permalink].present? ? '/' + params[:permalink] : nil
|
72
|
+
end
|
73
|
+
|
74
|
+
def home_path
|
75
|
+
request.path == '/' ? '/home' : nil
|
76
|
+
end
|
69
77
|
end
|
data/lib/qwerty/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qwerty
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5.pre
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-02-
|
12
|
+
date: 2012-02-24 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nested_set
|
16
|
-
requirement: &
|
16
|
+
requirement: &2157591740 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2157591740
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: acts_as_list
|
27
|
-
requirement: &
|
27
|
+
requirement: &2157591300 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2157591300
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: inherited_resources
|
38
|
-
requirement: &
|
38
|
+
requirement: &2157590820 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *2157590820
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: simple_form
|
49
|
-
requirement: &
|
49
|
+
requirement: &2157590380 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *2157590380
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: jquery-rails
|
60
|
-
requirement: &
|
60
|
+
requirement: &2157589820 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *2157589820
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: sanitize
|
71
|
-
requirement: &
|
71
|
+
requirement: &2157589400 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *2157589400
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: dragonfly
|
82
|
-
requirement: &
|
82
|
+
requirement: &2157588980 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: '0'
|
88
88
|
type: :runtime
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *2157588980
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: faker
|
93
|
-
requirement: &
|
93
|
+
requirement: &2157588460 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ! '>='
|
@@ -98,10 +98,10 @@ dependencies:
|
|
98
98
|
version: '0'
|
99
99
|
type: :runtime
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *2157588460
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: rails
|
104
|
-
requirement: &
|
104
|
+
requirement: &2157587960 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
107
|
- - ~>
|
@@ -109,10 +109,10 @@ dependencies:
|
|
109
109
|
version: '3.0'
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
|
-
version_requirements: *
|
112
|
+
version_requirements: *2157587960
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: sqlite3
|
115
|
-
requirement: &
|
115
|
+
requirement: &2157587440 !ruby/object:Gem::Requirement
|
116
116
|
none: false
|
117
117
|
requirements:
|
118
118
|
- - ! '>='
|
@@ -120,10 +120,10 @@ dependencies:
|
|
120
120
|
version: '0'
|
121
121
|
type: :development
|
122
122
|
prerelease: false
|
123
|
-
version_requirements: *
|
123
|
+
version_requirements: *2157587440
|
124
124
|
- !ruby/object:Gem::Dependency
|
125
125
|
name: mysql2
|
126
|
-
requirement: &
|
126
|
+
requirement: &2157586980 !ruby/object:Gem::Requirement
|
127
127
|
none: false
|
128
128
|
requirements:
|
129
129
|
- - ! '>='
|
@@ -131,7 +131,7 @@ dependencies:
|
|
131
131
|
version: '0'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
|
-
version_requirements: *
|
134
|
+
version_requirements: *2157586980
|
135
135
|
description: The core functionality on which to build a fully featured Content Management
|
136
136
|
System using Rails 3
|
137
137
|
email:
|
@@ -576,6 +576,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
576
576
|
- - ! '>='
|
577
577
|
- !ruby/object:Gem::Version
|
578
578
|
version: '0'
|
579
|
+
segments:
|
580
|
+
- 0
|
581
|
+
hash: -1995161888139260598
|
579
582
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
580
583
|
none: false
|
581
584
|
requirements:
|