Permalink
Browse files

Fixed the initialization to be explicitly included in ActionView::Base

By the time the plugin loads, ActionView::Base has Helpers module
already included, so it's missing the appended features from DynamicForm
module. Fixed it by including DynamicForm module directly into the
ActionView::Base.
  • Loading branch information...
1 parent dcfaa4b commit 0f67d6790e9fc28ac101cb74d168bda1a0952ecd @ratnikov ratnikov committed with josevalim Apr 27, 2010
Showing with 6 additions and 4 deletions.
  1. +5 −1 init.rb
  2. +1 −3 lib/action_view/helpers/dynamic_form.rb
View
@@ -1 +1,5 @@
-require 'action_view/helpers/dynamic_form'
+require 'action_view/helpers/dynamic_form'
+
+class ActionView::Base
+ include DynamicForm
+end
@@ -287,8 +287,6 @@ def error_messages(options = {})
end
end
- include DynamicForm
-
class InstanceTag
include DynamicForm::InstanceTagMethods
end
@@ -299,4 +297,4 @@ class FormBuilder
end
end
-I18n.load_path << File.expand_path("../../locale/en.yml", __FILE__)
+I18n.load_path << File.expand_path("../../locale/en.yml", __FILE__)

0 comments on commit 0f67d67

Please sign in to comment.