Permalink
Browse files

update readme

  • Loading branch information...
1 parent aefc71e commit 37c5e3bd70fab7b0fc740946ad930f6c3d1fc9c0 @activestylus committed Mar 13, 2011
Showing with 12 additions and 5 deletions.
  1. +8 −1 README.markdown
  2. +1 −1 lib/padrino-fields.rb
  3. +1 −1 lib/padrino-fields/form_builder.rb
  4. +2 −2 test/helper.rb
View
@@ -13,6 +13,13 @@ Install the gem:
Add it to your Gemfile:
gem "padrino-fields"
+
+
+Initialize it in your **app.rb**
+
+ register PadrinoFields
+
+ set :default_builder, 'PadrinoFields'
## Basic Usage
@@ -135,7 +142,7 @@ Require your orm file and include its module as follows:
module Padrino
module Helpers
module FormBuilder
- class FieldsFormBuilder < AbstractFormBuilder #:nodoc:
+ class PadrinoFields < AbstractFormBuilder #:nodoc:
include PadrinoFields::MyCoolOrm if defined?(MyCoolOrm)
@@ -21,7 +21,7 @@ module PadrinoFields
class << self
def registered(app)
app.set :default_builder, 'StandardFormBuilder'
- app.helpers Padrino::Helpers::FormBuilder::FieldsFormBuilder
+ app.helpers Padrino::Helpers::FormBuilder::PadrinoFields
rescue
end
alias :included :registered
@@ -6,7 +6,7 @@
module Padrino
module Helpers
module FormBuilder #:nodoc:
- class FieldsFormBuilder < AbstractFormBuilder #:nodoc:
+ class PadrinoFields < AbstractFormBuilder #:nodoc:
include PadrinoFields::Settings
include PadrinoFields::DataMapperWrapper if defined?(DataMapper)
View
@@ -56,7 +56,7 @@ def app
end
def field(object=Person.new)
- Padrino::Helpers::FormBuilder::FieldsFormBuilder.new(self, object)
+ Padrino::Helpers::FormBuilder::PadrinoFields.new(self, object)
end
Webrat.configure do |config|
@@ -121,7 +121,7 @@ def logger # :nodoc:
end
end
-class Padrino::Helpers::FormBuilder::FieldsFormBuilder
+class Padrino::Helpers::FormBuilder::PadrinoFields
public :setup_label, :hint, :default_radios, :domize

0 comments on commit 37c5e3b

Please sign in to comment.