Skip to content

Commit

Permalink
Fixed the initialization to be explicitly included in ActionView::Base
Browse files Browse the repository at this point in the history
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
ratnikov authored and josevalim committed Apr 28, 2010
1 parent dcfaa4b commit 0f67d67
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 5 additions & 1 deletion init.rb
@@ -1 +1,5 @@
require 'action_view/helpers/dynamic_form' require 'action_view/helpers/dynamic_form'

class ActionView::Base
include DynamicForm
end
4 changes: 1 addition & 3 deletions lib/action_view/helpers/dynamic_form.rb
Expand Up @@ -287,8 +287,6 @@ def error_messages(options = {})
end end
end end


include DynamicForm

class InstanceTag class InstanceTag
include DynamicForm::InstanceTagMethods include DynamicForm::InstanceTagMethods
end end
Expand All @@ -299,4 +297,4 @@ class FormBuilder
end end
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.