How to Isolate Formtastic helpers/config to Rails engine?

Hello…

I would like to use Formtastic and set Formtastic configs inside a Rails Engine, without having those changes to form helpers/config ‘leak’ into my main application.

Specifically I am trying to isolate an implementation of Formtastic that is customized for Bootstrap 3 to within my engine, without having the main app’s form helpers start using the same markup.

I could specify the “:builder” option in all my main app’s calls to form helpers to override this ‘leak’, however it would probably be better for the engine’s helpers not to leak into the main app in the first place?

Can anyone please offer some insight on how to go about that?

Any help appreciated,

-S

Looks like because Formtastic opens up ActionView and includes its helpers it would be hard to isolate separate implementations of Formtastic between an engine and main app. So probably the better design would be to set no default builder in the engine whatsoever, and instead explicitly specify the form builders in-line for all calls to semantic_form_for inside the engine.