Module: Formize
- Extended by:
- ActiveSupport::Autoload
- Defined in:
- lib/formize.rb,
lib/formize/helpers.rb,
lib/formize/generator.rb,
lib/formize/definition.rb,
lib/formize/rails/engine.rb,
lib/formize/rails/railtie.rb,
lib/formize/definition/form.rb,
lib/formize/definition/field.rb,
lib/formize/action_controller.rb,
lib/formize/helpers/tag_helper.rb,
lib/formize/helpers/form_helper.rb,
lib/formize/definition/field_set.rb,
lib/formize/definition/form_element.rb,
lib/formize/helpers/form_tag_helper.rb
Overview
:include: ../README.rdoc
Defined Under Namespace
Modules: ActionController, CompiledLabels, Definition, Generator, Helpers Classes: Engine, Railtie
Constant Summary collapse
- DATE_FORMAT_TOKENS =
{ 'dd' => '%d', 'oo' => '%j', 'D' => '%a', 'DD' => '%A', 'mm' => '%m', 'M' => '%b', 'MM' => '%B', 'y' => '%y', 'yy' => '%Y' }.freeze
- TIME_FORMAT_TOKENS =
{ 'HH' => '%H', 'mm' => '%M', 'ss' => '%S', 'tt' => '%p', 'TT' => '%P' }.freeze
Class Method Summary collapse
Class Method Details
.configure(name, value = nil) ⇒ Object
:nodoc:
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/formize.rb', line 24 def self.configure(name, value = nil) # :nodoc: unless self.respond_to?("#{name}=") # mattr_accessor(name) code = "unless defined?(@@#{name})\n" code << " @@#{name} = nil\n" code << "end\n" code << "def self.#{name}\n" code << " @@#{name}\n" code << "end\n" code << "def self.#{name}=(obj)\n" code << " @@#{name} = obj\n" code << "end\n" class_eval(code, __FILE__, __LINE__ + 1) self.send("#{name}=", value) end end |
.foreign_key ⇒ Object
8 9 10 |
# File 'lib/formize.rb', line 8 def self.foreign_key :foreign_key end |