public
Description: Rails Sitemap Plugin / Site Map Plugin for Rails. A beautiful rails sitemap plugin that talks to Google, Yahoo and MSN when updated. Sitemap features clean handcrafted XHTML, XML with XSLT and custom finder options for your named routes.
Clone URL: git://github.com/queso/sitemap.git
Adding my routes... Hope this works, it will be awesomness!
queso (author)
Sat Jan 12 19:57:04 -0800 2008
commit  b3cfc3d55ce59c380b6ed8a1588c3d79c496fe84
tree    6f28d80aa225e520b797c1c66c52086237b31db8
parent  cafb06e46720052dfc1da29e437bf1c9eb5eb763
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
 
 
 
 
 
 
 
 
 
 
42
...
1
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
4
5
6
7
8
9
10
11
12
13
0
@@ -1,42 +1,13 @@
0
 Mime::Type.register_alias "text/xml", :xsl
0
 
0
-module Queso
0
- module SEO
0
-
0
- class ConfigFileNotFoundError < StandardError; end
0
-
0
- class Sitemap
0
- attr_accessor :sitemap_config
0
-
0
- def initialize(file = '/config/sitemap.yml') #:nodoc:
0
- begin
0
- path = RAILS_ROOT + file
0
- @sitemap_config = YAML.load_file(path).symbolize_keys
0
- rescue
0
- raise ConfigFileNotFoundError.new('File %s not found' % path )
0
- end
0
- end
0
-
0
- def widgets
0
- widgets = {}
0
- sitemap_config[:widgets].each_key do |k|
0
- widgets[k] = find_widgets(sitemap_config[:widgets][k]["model"].constantize)
0
- end
0
- widgets
0
- end
0
-
0
- def find_widgets(widget_model, options = {})
0
- widget_model.find(:all, options)
0
- end
0
-
0
- def site
0
- site = sitemap_config[:site].symbolize_keys
0
- end
0
-
0
- def static_links
0
- static_links = sitemap_config[:static_links].symbolize_keys
0
- end
0
-
0
- end
0
- end
0
+
0
+class << ActionController::Routing::Routes;self;end.class_eval do
0
+ define_method :clear!, lambda {}
0
+end
0
+
0
+ActionController::Routing::Routes.draw do |map|
0
+ map.resource :sitemap
0
+ map.resources :sitemap_settings, :collection => {:widgets => :get}
0
+ map.resources :sitemap_widgets
0
+ map.resources :sitemap_static_links
0
 end

Comments

    No one has commented yet.