From 287327d62a46ec4fdccc90ff56ab570d88eca3d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Blizni=C4=8Denko?= Date: Wed, 12 Nov 2014 18:12:26 +0100 Subject: [PATCH 1/2] added index screen! --- Gemfile | 3 ++- Gemfile.lock | 23 +++++++++++------------ app/views/authors/index.html.haml | 4 ++-- config/routes.rb | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Gemfile b/Gemfile index 4b78cc3..5bd1788 100644 --- a/Gemfile +++ b/Gemfile @@ -44,9 +44,10 @@ gem 'spring', group: :development gem 'devise' group :development, :test do - gem 'debugger' + #gem 'debugger' gem 'rspec-rails' gem 'better_errors' gem 'binding_of_caller' end +gem "tzinfo-data" diff --git a/Gemfile.lock b/Gemfile.lock index cf38cc2..fb2c9a3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -29,9 +29,11 @@ GEM tzinfo (~> 1.1) arel (5.0.1.20140414130214) bcrypt (3.1.9) - better_errors (1.0.1) + bcrypt (3.1.9-x86-mingw32) + better_errors (2.0.0) coderay (>= 1.0.0) erubis (>= 2.6.6) + rack (>= 0.9.0) binding_of_caller (0.7.2) debug_inspector (>= 0.0.1) bootstrap-sass (3.3.0.1) @@ -45,14 +47,7 @@ GEM coffee-script-source execjs coffee-script-source (1.8.0) - columnize (0.8.9) debug_inspector (0.0.2) - debugger (1.6.8) - columnize (>= 0.3.1) - debugger-linecache (~> 1.2.0) - debugger-ruby_core_source (~> 1.3.5) - debugger-linecache (1.2.0) - debugger-ruby_core_source (1.3.5) devise (3.4.1) bcrypt (~> 3.0) orm_adapter (~> 0.1) @@ -82,7 +77,7 @@ GEM mail (2.6.3) mime-types (>= 1.16, < 3) mime-types (2.4.3) - minitest (5.4.2) + minitest (5.4.3) multi_json (1.10.1) orm_adapter (0.5.0) rack (1.5.2) @@ -106,7 +101,7 @@ GEM rake (10.3.2) rdoc (4.1.2) json (~> 1.4) - responders (1.1.1) + responders (1.1.2) railties (>= 3.2, < 4.2) rspec-core (3.1.7) rspec-support (~> 3.1.0) @@ -144,13 +139,16 @@ GEM activesupport (>= 3.0) sprockets (>= 2.8, < 4.0) sqlite3 (1.3.10) + sqlite3 (1.3.10-x86-mingw32) thor (0.19.1) thread_safe (0.3.4) tilt (1.4.1) - turbolinks (2.5.1) + turbolinks (2.5.2) coffee-rails tzinfo (1.2.2) thread_safe (~> 0.1) + tzinfo-data (1.2014.10) + tzinfo (>= 1.0.0) uglifier (2.5.3) execjs (>= 0.3.0) json (>= 1.8.0) @@ -159,13 +157,13 @@ GEM PLATFORMS ruby + x86-mingw32 DEPENDENCIES better_errors binding_of_caller bootstrap-sass coffee-rails (~> 4.0.0) - debugger devise haml-rails jbuilder (~> 2.0) @@ -177,4 +175,5 @@ DEPENDENCIES spring sqlite3 turbolinks + tzinfo-data uglifier (>= 1.3.0) diff --git a/app/views/authors/index.html.haml b/app/views/authors/index.html.haml index 758449e..357ab34 100644 --- a/app/views/authors/index.html.haml +++ b/app/views/authors/index.html.haml @@ -1,6 +1,6 @@ %h1 Listing authors -%table +%table.table.table-striped %tr %th Firstname %th Surname @@ -18,4 +18,4 @@ %br -= link_to 'New Author', new_author_path += link_to 'New Author', new_author_path, class:'btn btn-primary' diff --git a/config/routes.rb b/config/routes.rb index eee3323..ce04f4c 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -10,7 +10,7 @@ # See how all your routes lay out with "rake routes". # You can have the root of your site routed with "root" - root 'theses#index' + root 'index#index' # Example of regular route: # get 'products/:id' => 'catalog#view' From 5c1dcd48a947073f02ef1fe938c3230e715db010 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Blizni=C4=8Denko?= Date: Wed, 12 Nov 2014 18:22:07 +0100 Subject: [PATCH 2/2] ehm... now I finally added that change --- app/controllers/index_controller.rb | 2 ++ app/views/index/index.html.haml | 3 +++ 2 files changed, 5 insertions(+) create mode 100644 app/controllers/index_controller.rb create mode 100644 app/views/index/index.html.haml diff --git a/app/controllers/index_controller.rb b/app/controllers/index_controller.rb new file mode 100644 index 0000000..dbac5b9 --- /dev/null +++ b/app/controllers/index_controller.rb @@ -0,0 +1,2 @@ +class IndexController < ApplicationController +end diff --git a/app/views/index/index.html.haml b/app/views/index/index.html.haml new file mode 100644 index 0000000..4ccff6d --- /dev/null +++ b/app/views/index/index.html.haml @@ -0,0 +1,3 @@ +%h1 Wilkommen! += link_to 'Theses', theses_path, class:'btn btn-primary' += link_to 'Authors', authors_path, class:'btn btn-primary'