Class: Kiss::Form::FileField
Constant Summary
Constants inherited
from Field
Kiss::Form::Field::CURRENCY_SYMBOLS
Instance Method Summary
collapse
Methods inherited from Field
#add_error, #content_tag_html, #debug, #errors_html, #html, #initialize, #input_tag_html, #method_missing, #param, #reset, #set_value_to_hash, #set_value_to_object, #tag_html, #tag_start_html, #tip_html, #type, #value, #value_string, #value_to_s
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Kiss::Form::Field
Instance Method Details
#element_html(attrs = {}) ⇒ Object
507
508
509
|
# File 'lib/kiss/form/field.rb', line 507
def element_html(attrs = {})
input_tag_html(attrs) + tip_html(attrs)
end
|
#get_file_data ⇒ Object
513
|
# File 'lib/kiss/form/field.rb', line 513
def get_file_data; end
|
#get_file_name ⇒ Object
511
|
# File 'lib/kiss/form/field.rb', line 511
def get_file_name; end
|
#require_value(enter_verb) ⇒ Object
515
516
517
518
|
# File 'lib/kiss/form/field.rb', line 515
def require_value(enter_verb)
p = param
return add_error("Please choose #{label.downcase}.") unless p && p[:type]
end
|
520
521
522
|
# File 'lib/kiss/form/field.rb', line 520
def validate
require_value(nil) if @_required
end
|