Module: ActionForm::ElementsDSL

Included in:
Base, Subform
Defined in:
lib/action_form/elements_dsl.rb

Overview

Provides a DSL for defining form elements with input and output configurations. This module allows form classes to define elements using a simple block syntax. Elements can be configured with input types, output formats, labels and other options.

Examples:

class UserForm < ActionForm::Base
  element :name do
    input type: :text
    label text: "Full Name"
  end
end

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



16
17
18
# File 'lib/action_form/elements_dsl.rb', line 16

def self.included(base)
  base.extend(ClassMethods)
end