Added Base class for Plugin Hooks. #1296
This commit is contained in:
1 parent
04434cd6ef
commit
8995245a0c
1 file changed
+25
-1
+25
-1
@@ -174,9 +174,33 @@ module Redmine #:nodoc:
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Default class for Hooks to subclass
|
# Base class for Redmin Plugin hooks.
|
||||||
class Base
|
class Base
|
||||||
|
|
||||||
|
# Class level access to Rails' helper methods.
|
||||||
|
def self.help
|
||||||
|
Helper.instance
|
||||||
|
end
|
||||||
|
|
||||||
|
# Includes several Helper methods to be used in the class
|
||||||
|
class Helper # :nodoc:
|
||||||
|
include Singleton
|
||||||
|
include ERB::Util
|
||||||
|
include ActionView::Helpers::TagHelper
|
||||||
|
include ActionView::Helpers::FormHelper
|
||||||
|
include ActionView::Helpers::FormTagHelper
|
||||||
|
include ActionView::Helpers::FormOptionsHelper
|
||||||
|
include ActionView::Helpers::JavaScriptHelper
|
||||||
|
include ActionView::Helpers::PrototypeHelper
|
||||||
|
include ActionView::Helpers::UrlHelper
|
||||||
|
|
||||||
|
include ActionController::UrlWriter
|
||||||
|
|
||||||
|
def protect_against_forgery? # :nodoc:
|
||||||
|
false
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in new issue
Block a user