From 5f270459ccd8d5128b65db5191a12a4d8320f3b1 Mon Sep 17 00:00:00 2001 From: basnal Date: Fri, 11 Jul 2014 11:00:32 +0530 Subject: [PATCH] Code was refactored #11 --- .gitignore | 1 + app/controllers/spreadsheets_controller.rb | 3 --- config/routes.rb | 9 +-------- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 72dcb25..b8ae448 100644 --- a/.gitignore +++ b/.gitignore @@ -49,3 +49,4 @@ build/ /tmp *.log test.html.haml + diff --git a/app/controllers/spreadsheets_controller.rb b/app/controllers/spreadsheets_controller.rb index 8bf26d1..c823cdc 100644 --- a/app/controllers/spreadsheets_controller.rb +++ b/app/controllers/spreadsheets_controller.rb @@ -6,8 +6,6 @@ def index end def new - @req = params -=begin if params[:access_token] spreadsheet = Spreadsheet.where(access_token: params['access_token'])[0] else @@ -24,7 +22,6 @@ def new @msg = 'no work' # Handle if data does not get saved end -=end end def edit diff --git a/config/routes.rb b/config/routes.rb index 8f07095..3e337c7 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,12 +1,5 @@ Rails.application.routes.draw do -=begin - get '/home/sheets', to: 'home#add_from_google', as: 'add_from_google' - get '/auth/:provider/callback', to: 'callbacks#omniauth' - get '/linkedin', to: 'callbacks#linkedin', as: 'linkedin' - get '/callbacks/sheet/:id', to: 'callbacks#setSheet', as: 'set_sheet' - get '/callbacks/index', to: 'callbacks#index', as: 'callback_index' - get '/callbacks/update/:id', to: 'callbacks#update', as: 'callback_update' -=end + get '/auth/:provider/callback', to: 'spreadsheets#new' resources :users, :newsletters, :home, :spreadsheets