noodall-ui 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/app/controllers/noodall/nodes_controller.rb +13 -1
- data/lib/noodall/ui/version.rb +1 -1
- metadata +4 -4
data/Gemfile.lock
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
module Noodall
|
2
2
|
class NodesController < ApplicationController
|
3
|
+
rescue_from MongoMapper::DocumentNotFound, :with => :render_404
|
4
|
+
|
3
5
|
def show
|
4
6
|
if flash.any? or published_states_changed_since_global_update? or stale?(:last_modified => GlobalUpdateTime::Stamp.read, :public => true)
|
5
7
|
permalink = params[:permalink].is_a?(String) ? params[:permalink] : params[:permalink].join('/')
|
@@ -14,13 +16,14 @@ module Noodall
|
|
14
16
|
format.rss { render "nodes/#{@node.class.name.underscore}" }
|
15
17
|
end
|
16
18
|
end
|
19
|
+
|
17
20
|
end
|
18
21
|
|
19
22
|
def sitemap
|
20
23
|
if stale?(:last_modified => GlobalUpdateTime::Stamp.read, :public => true)
|
21
24
|
@page_title = 'Sitemap'
|
22
25
|
end
|
23
|
-
|
26
|
+
|
24
27
|
@nodes = Node.all
|
25
28
|
end
|
26
29
|
|
@@ -39,5 +42,14 @@ module Noodall
|
|
39
42
|
true
|
40
43
|
end
|
41
44
|
end
|
45
|
+
|
46
|
+
def render_404(exception = nil)
|
47
|
+
if exception
|
48
|
+
logger.info "Rendering 404: #{exception.message}"
|
49
|
+
end
|
50
|
+
|
51
|
+
render :file => "#{Rails.root}/public/404.html", :status => 404, :layout => false
|
52
|
+
end
|
53
|
+
|
42
54
|
end
|
43
55
|
end
|
data/lib/noodall/ui/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: noodall-ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 9
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 11
|
10
|
+
version: 0.0.11
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Steve England
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-11-
|
18
|
+
date: 2010-11-19 00:00:00 +00:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|