# Collection of code snippets by Arne Vajhøj 
# (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
class TestController < ApplicationController
    skip_before_action :verify_authenticity_token
    def list
        @data = DB::getAll
        @options = [ "", T1::VER, T1::NOTVER ]
    end
    def add
        f1 = params["f1"]
        f2 = params["f2"]
        f3 = params["f3"]
        o = T1.new(f1, f2, f3)
        DB::addOne(o)
        redirect_to "/"
    end
end
