Skip to content

Instantly share code, notes, and snippets.

@michaelklishin
Created August 13, 2008 04:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaelklishin/5195 to your computer and use it in GitHub Desktop.
Save michaelklishin/5195 to your computer and use it in GitHub Desktop.
load File.dirname(__FILE__) / "form" / "helpers.rb"
load File.dirname(__FILE__) / "form" / "builder.rb"
class Merb::Controller
class_inheritable_accessor :_form_class
include Merb::Helpers::Form
end
Merb::BootLoader.after_app_loads do
class Merb::Controller
self._form_class =
Object.full_const_get(Merb::Plugins.config[:helpers][:form_class]) rescue Merb::Helpers::Form::Builder::FormWithErrors
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment