Created — forked from TorD/gist:1869279

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist
View gist:1869574
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
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
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.