diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..87afabbb --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +log/* \ No newline at end of file diff --git a/app/controllers/tests_controller.rb b/app/controllers/tests_controller.rb index 1526a689..1da3ff87 100644 --- a/app/controllers/tests_controller.rb +++ b/app/controllers/tests_controller.rb @@ -1,11 +1,15 @@ class TestsController < Simpler::Controller - def index @time = Time.now + @tests = Test.all + headers["Content-Type"] = "text/html" + status 201 end def create - end + def show + @test = Test.where(id: params[:id]).first + end end diff --git a/app/views/tests/index.html.erb b/app/views/tests/index.html.erb index 39fce580..c6e343f5 100644 --- a/app/views/tests/index.html.erb +++ b/app/views/tests/index.html.erb @@ -1,12 +1,18 @@
- +<%= @time %>
+ +