public
Description: CMS plugin for ruby on rails. Really easy to set up and use.
Homepage: http://www.pullmonkey.com/projects/simple_cms
Clone URL: git://github.com/pullmonkey/simple_cms.git
jeroenj (author)
Thu Sep 03 06:43:23 -0700 2009
commit  2411bcdd4c7ffb32ca1fe148776b9d8613942bbb
tree    1fb200bd98981152c8bd1cb5156dabd1d5065e80
parent  b2355525f1913e2c31137da1d6be93e06e6e6d96
simple_cms / init.rb
100644 33 lines (26 sloc) 1.214 kb
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
# Include hook code here
#require 'application'
require 'simple_cms'
 
ActionView::Base.send :include, SimpleCmsMod::Render
 
ApplicationController.send :include, SimpleCmsMod::ViewPaths
 
model_path = File.join(directory, 'app', 'models')
$LOAD_PATH << model_path
 
# Use Dependencies.load_paths for any version <= 2.1.0
# Use ActiveSupport::Dependencies.load_paths for any version >= 2.1.1
# If you are using a version <= 2.1.0 and it is not in the list then add it
if %w(1.2.0 1.2.1 1.2.3 1.2.4 1.2.5 1.2.6 2.0.0 2.0.1 2.0.2 2.1.0).include?(RAILS_GEM_VERSION)
  Dependencies.load_paths << model_path
else
  ActiveSupport::Dependencies.load_paths << model_path
end
 
controller_path = File.join(directory, 'app', 'controllers')
$LOAD_PATH << controller_path
 
# Use Dependencies.load_paths for any version <= 2.1.0
# Use ActiveSupport::Dependencies.load_paths for any version >= 2.1.1
# If you are using a version <= 2.1.0 and it is not in the list then add it
if %w(1.2.0 1.2.1 1.2.3 1.2.4 1.2.5 1.2.6 2.0.0 2.0.1 2.0.2 2.1.0).include?(RAILS_GEM_VERSION)
  Dependencies.load_paths << controller_path
else
  ActiveSupport::Dependencies.load_paths << controller_path
end
config.controller_paths << controller_path