Permalink
Browse files

Fix namespace conflict

  • Loading branch information...
1 parent 68f82bc commit 7ef61697ad60a2172de404c89dbbba51e6ebd4a4 @activestylus committed Mar 13, 2011
Showing with 11 additions and 4 deletions.
  1. +1 −1 lib/padrino-fields.rb
  2. +8 −1 lib/padrino-fields/form_builder.rb
  3. +2 −2 test/helper.rb
View
@@ -21,7 +21,7 @@ module PadrinoFields
class << self
def registered(app)
app.set :default_builder, 'StandardFormBuilder'
- app.helpers Padrino::Helpers::FormBuilder::PadrinoFields
+ app.helpers Padrino::Helpers::FormBuilder::PadrinoFieldsBuilder
rescue
end
alias :included :registered
@@ -6,7 +6,7 @@
module Padrino
module Helpers
module FormBuilder #:nodoc:
- class PadrinoFields < AbstractFormBuilder #:nodoc:
+ class PadrinoFieldsBuilder < AbstractFormBuilder #:nodoc:
include PadrinoFields::Settings
include PadrinoFields::DataMapperWrapper if defined?(DataMapper)
@@ -63,6 +63,13 @@ def #{type}_field(field, options={})
EOF
end
+ def grouped_options(collection)
+ collection.map do |optgroup|
+ optgroup.map do |option|
+ end
+ end
+ end
+
protected
def collect_inputs_as(attribute,type,options={})
View
@@ -56,7 +56,7 @@ def app
end
def field(object=Person.new)
- Padrino::Helpers::FormBuilder::PadrinoFields.new(self, object)
+ Padrino::Helpers::FormBuilder::PadrinoFieldsBuilder.new(self, object)
end
Webrat.configure do |config|
@@ -121,7 +121,7 @@ def logger # :nodoc:
end
end
-class Padrino::Helpers::FormBuilder::PadrinoFields
+class Padrino::Helpers::FormBuilder::PadrinoFieldsBuilder
public :setup_label, :hint, :default_radios, :domize

0 comments on commit 7ef6169

Please sign in to comment.