Merge with new_blog

This commit is contained in:
chris2tof committed 2011-10-18 11:36:01 +08:00
1 parent 2e86d8081f
commit 64c68fcdeb
80 files changed
+906 -79

No files matched your search

+21
View File
@@ -6,6 +6,25 @@ class ApplicationController < ActionController::Base
helper :all
before_filter :set_locale, :set_site
def get_all_app_engines
ary = ["vender/plugins/NewBlog"]
app_engines = ary.collect{|t|
Rails::Engine.find t
}
app_engines.each{ |t|
# t.
}
end
def flaten_controller
ary=[]
Find.find(File.join(Rails.root , 'vendor/plugins/')) { |name|
require_dependency(name) if /_controller\.rb$/ =~ name
ary << name
}
ary
end
# Find the parent for the given item
def find_parent_item
@parent_item = Item.first(:conditions => { :id => BSON::ObjectId(params[:parent_id]) }) rescue nil
@@ -78,4 +97,6 @@ class ApplicationController < ActionController::Base
Item.first(:conditions => {:parent_id => nil})
end
end