module Formular::Element::Modules::Control::InstanceMethods

Public Instance Methods

attribute_name() click to toggle source
# File lib/formular/element/modules/control.rb, line 18
def attribute_name
  options[:attribute_name]
end

Private Instance Methods

builder_attribute?() click to toggle source

FIXME… we should probably find a better way of returning nil to all of these if no attribute_name or builder

# File lib/formular/element/modules/control.rb, line 26
def builder_attribute?
  attribute_name && builder
end
form_encoded_id() click to toggle source
# File lib/formular/element/modules/control.rb, line 38
def form_encoded_id
  path.to_encoded_id if builder_attribute?
end
form_encoded_name() click to toggle source
# File lib/formular/element/modules/control.rb, line 34
def form_encoded_name
  path.to_encoded_name if builder_attribute?
end
path() click to toggle source
# File lib/formular/element/modules/control.rb, line 30
def path
  @path ||= builder.path(attribute_name) if builder_attribute?
end
reader_value() click to toggle source
# File lib/formular/element/modules/control.rb, line 42
def reader_value
  builder.reader_value(attribute_name) if builder_attribute?
end