Skip to content

@rolfb /gist:1869574 forked from TorD/gist:1869279
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
def get_field_type_for(kind)
types = {
"nr" => "number",
"tlf" => "number",
"telefon" => "number",
"nummer" => "number",
"merknad" => "text",
"notater" => "text",
"anmerkning" => "text"
}
types[kind.to_s.downcase] || "string"
end
@rolfb
Owner

mini-performance boost by not using types.default (hat tip @hakon)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.