diff --git a/app/controllers/authentications_controller.rb b/app/controllers/authentications_controller.rb index c593e33..73b8788 100644 --- a/app/controllers/authentications_controller.rb +++ b/app/controllers/authentications_controller.rb @@ -6,7 +6,7 @@ def index end def create - render :text => request.env["omniauth.auth"].to_yaml + render :text => request.env['omniauth.auth'].to_yaml # auth = request.env["omniauth.auth"] # current_user.authentications.create(:provider => auth['provider'], :uid => auth['uid']) # flash[:notice] = "Authentication successful." diff --git a/app/controllers/test_names_controller.rb b/app/controllers/test_names_controller.rb index 3bca573..6548a00 100644 --- a/app/controllers/test_names_controller.rb +++ b/app/controllers/test_names_controller.rb @@ -10,25 +10,26 @@ def index def show @test = TestName.find(params[:id]) - question = Hash.new(@test.questions.all.sample(25)) - @question = @test.questions.limit(25) +# question = Hash.new(@test.questions.all.sample(25)) +# @question = @test.questions.limit(25) #render :action => :start - session[:test_step] = nil +# session[:test_step] = nil end def start @test = TestName.find(params[:id]) - @question = @test.questions.limit(25) - session[:test_step].deep_merge!(params[:f]) if params[:f] - @test.current_step = session[:test_step] - if params[:back_button] - @test.previous_step - elsif @test.last_step? - @test.result - else - @test.next_step - end - session[:test_step] = @test.current_step + @question = @test.questions.all.sample(5) +# @question = @test.questions.limit(25) +# session[:test_step].deep_merge!(params[:f]) if params[:f] +# @test.current_step = session[:test_step] +# if params[:back_button] +# @test.previous_step +# elsif @test.last_step? +# @test.result +# else +# @test.next_step +# end +# session[:test_step] = @test.current_step end end diff --git a/app/views/authentications/index.html.erb b/app/views/authentications/index.html.erb index 0da3b5f..a900f6e 100644 --- a/app/views/authentications/index.html.erb +++ b/app/views/authentications/index.html.erb @@ -1,4 +1,3 @@ -1111 <% if @authentications %> <% unless @authentications.empty? %>
You can sign in to this account using:
diff --git a/app/views/test_names/start.html.erb b/app/views/test_names/start.html.erb index a728130..3c9c87b 100644 --- a/app/views/test_names/start.html.erb +++ b/app/views/test_names/start.html.erb @@ -1,9 +1,8 @@ -