Skip to content
Browse files

support more presenter paths and add custom_title_type to the pages p…

…resenter.
  • Loading branch information...
1 parent 7d0dec4 commit 340ae30a88858bf61ec29e305d81f754291b52e3 @parndt parndt committed
View
2 VERSION
@@ -1 +1 @@
-0.9.6.27
+0.9.6.28
View
2 config/application.rb
@@ -2,7 +2,7 @@
RAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSION
# Specified gem version of Refinery to use when vendor/plugins/refinery/lib/refinery.rb is not present.
-REFINERY_GEM_VERSION = '0.9.6.27' unless defined? REFINERY_GEM_VERSION
+REFINERY_GEM_VERSION = '0.9.6.28' unless defined? REFINERY_GEM_VERSION
# Boot Rails
require File.join(File.dirname(__FILE__), 'boot')
View
6 vendor/plugins/pages/app/presenters/page_presenter.rb
@@ -1,3 +1,7 @@
class PagePresenter < Refinery::BasePresenter
- #delegate DEFAULT_FIELDS.keys :to => :model
+
+ def custom_title_type
+ @model.custom_title_type
+ end
+
end
View
12 vendor/plugins/refinery/rails/init.rb
@@ -9,6 +9,12 @@
require_dependency 'refinery/form_helpers'
require_dependency 'refinery/base_presenter'
-presenters_path = Rails.root.join("app", "presenters").to_s
-$LOAD_PATH << presenters_path
-::ActiveSupport::Dependencies.load_paths << presenters_path
+[ Refinery.root.join("vendor", "plugins", "*", "app", "presenters").to_s,
+ Rails.root.join("vendor", "plugins", "*", "app", "presenters").to_s,
+ Rails.root.join("app", "presenters").to_s
+].uniq.each do |path|
+ Dir[path].each do |presenters_path|
+ $LOAD_PATH << presenters_path
+ ::ActiveSupport::Dependencies.load_paths << presenters_path
+ end
+end

0 comments on commit 340ae30

Please sign in to comment.
Something went wrong with that request. Please try again.