Method: Formbuilder::ResponseFieldWebsite#normalize_response

Defined in:
app/models/formbuilder/response_field_website.rb

#normalize_response(value, all_responses) ⇒ Object



42
43
44
45
46
47
48
# File 'app/models/formbuilder/response_field_website.rb', line 42

def normalize_response(value, all_responses)
  return if value.blank?

  unless value[/^http:\/\//] || value[/^https:\/\//]
    all_responses[self.id.to_s] = "http://#{value}"
  end
end