diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 8397cd7..4abcc52 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -5,6 +5,10 @@ class ApplicationController < ActionController::Base helper_method :current_user + def angular + render '/angular' + end + def welcome render '/welcome' end diff --git a/app/controllers/session_controller.rb b/app/controllers/session_controller.rb index 1699048..a94a74e 100644 --- a/app/controllers/session_controller.rb +++ b/app/controllers/session_controller.rb @@ -13,6 +13,7 @@ class SessionController < ApplicationController user.update(session_token: token) flash[:message] = "Thanks for logging in, sinner." + redirect_to application_angular_path else flash[:message] = "Email / Password combo does not exist!" end diff --git a/app/views/angular.html.erb b/app/views/angular.html.erb new file mode 100644 index 0000000..2918a56 --- /dev/null +++ b/app/views/angular.html.erb @@ -0,0 +1 @@ +oh hai! diff --git a/config/routes.rb b/config/routes.rb index ebdc12a..6a6308e 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,6 +1,8 @@ Rails.application.routes.draw do root 'application#welcome' + get 'application/angular' + resources :transgressions, only: [:index, :create], defaults: { format: :json } do resources :confessions, only: [:create], shallow: true end