Module: SimpleFormWithClientValidation::Components::Readonly

Included in:
Inputs::Base
Defined in:
lib/simple_form_with_client_validation/components/readonly.rb

Overview

Needs to be enabled in order to do automatic lookups.

Instance Method Summary collapse

Instance Method Details

#readonlyObject



5
6
7
8
9
10
11
# File 'lib/simple_form_with_client_validation/components/readonly.rb', line 5

def readonly
  if readonly_attribute? && !has_readonly?
    input_html_options[:readonly] ||= true
    input_html_classes << :readonly
  end
  nil
end