require "i18n" require "forwardable" module Form autoload :Builder, "form/builder" autoload :Component, "form/component" autoload :Tag, "form/tag" autoload :Version, "form/version" # Lazily add locale file to I18n. # def self.add_locale(locale) I18n.load_path << File.expand_path("../form/locales/#{locale}.yml", __FILE__) end add_locale :en # Initialize a new Form::Builder object. # # form = Form.new(params[:user], "user") # def self.new(data = nil, base_name = nil) Builder.new(data, base_name) end end