diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..a8154340 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/log/* diff --git a/app/controllers/tests_controller.rb b/app/controllers/tests_controller.rb index 1526a689..76d75cfe 100644 --- a/app/controllers/tests_controller.rb +++ b/app/controllers/tests_controller.rb @@ -2,10 +2,17 @@ class TestsController < Simpler::Controller def index @time = Time.now + render 'tests/list' + status 200 end def create - + render plain: "txt" + status 201 end + def show + @test_id = params[:id] + render 'tests/list' + end end diff --git a/app/views/tests/create.html.erb b/app/views/tests/create.html.erb new file mode 100644 index 00000000..4cc14e6c --- /dev/null +++ b/app/views/tests/create.html.erb @@ -0,0 +1,11 @@ + + +
+ +<%= @time %>
+ + diff --git a/app/views/tests/list.html.erb b/app/views/tests/list.html.erb index 0d430491..91436166 100644 --- a/app/views/tests/list.html.erb +++ b/app/views/tests/list.html.erb @@ -6,7 +6,6 @@<%= @time %>
+Test id: <%= @test_id %>
-