Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
paneq committed Nov 2, 2010
1 parent 364ae5c commit 28bb57f
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.textile
Expand Up @@ -517,7 +517,24 @@ If you want to add your own input types to encapsulate your own logic or interfa

@Formtastic::SemanticFormHelper.builder = MyCustomBuilder@

Be aware that you should either set the options on custom builder or require it after setting options on formtastic default builder.

<pre>
# OK
Formtastic::SemanticFormBuilder.i18n_lookups_by_default = true
require 'formtastic/my_custom_builder'
Formtastic::SemanticFormHelper.builder = Formtastic::MyCustomBuilder

# OK
require 'formtastic/my_custom_builder'
Formtastic::SemanticFormHelper.builder = Formtastic::MyCustomBuilder
Formtastic::ExtendedFormBuilder.i18n_lookups_by_default = true

# WRONG!
require 'formtastic/my_custom_builder'
Formtastic::SemanticFormBuilder.i18n_lookups_by_default = true
Formtastic::SemanticFormHelper.builder = Formtastic::MyCustomBuilder
</pre>


h2. Status
Expand Down

0 comments on commit 28bb57f

Please sign in to comment.