Class: Form::BaseTag
- Inherits:
-
UI::Base
- Object
- UI::Base
- Form::BaseTag
show all
- Defined in:
- app/views/form/base_tag.rb
Constant Summary
collapse
- ALLOWED_OPTIONS =
[:readonly, :disabled, :name, :autofocus, :data].freeze
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.allowed_options ⇒ Object
7
8
9
|
# File 'app/views/form/base_tag.rb', line 7
def allowed_options
ALLOWED_OPTIONS
end
|
Instance Method Details
#id ⇒ Object
17
18
19
|
# File 'app/views/form/base_tag.rb', line 17
def id
form.field_id(method)
end
|
#name ⇒ Object
21
22
23
|
# File 'app/views/form/base_tag.rb', line 21
def name
form.field_name(method)
end
|
#value ⇒ Object
25
26
27
28
29
30
31
|
# File 'app/views/form/base_tag.rb', line 25
def value
return @value if @value
return if form.object.blank?
return unless form.object.respond_to?(method)
form.object.public_send(method)
end
|