module SimpleForm::Components::Readonly
def readonly
def readonly if readonly_attribute? && !has_readonly? input_html_options[:readonly] ||= true input_html_classes << :readonly end nil end
def readonly_attribute?
def readonly_attribute? object.class.respond_to?(:readonly_attributes) && object.persisted? && object.class.readonly_attributes.include?(attribute_name) end