diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 3ecf933b1..21182fd94 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -22,7 +22,6 @@ class UsersController < ApplicationController @user = current_user if params[:user][:getting_started] - puts "here" boolean = params[:user][:getting_started] == "true" @user.update_attributes( :getting_started => boolean ) redirect_to root_path @@ -38,9 +37,9 @@ class UsersController < ApplicationController flash[:error] = "Password Change Failed" end end - end - redirect_to edit_user_path(@user) + redirect_to edit_user_path(@user) + end end def destroy diff --git a/app/views/users/getting_started.html.haml b/app/views/users/getting_started.html.haml index 6f69c8de2..71bc63dd0 100644 --- a/app/views/users/getting_started.html.haml +++ b/app/views/users/getting_started.html.haml @@ -3,6 +3,18 @@ -# the COPYRIGHT file. +- if current_user.getting_started == true + :javascript + $("#getting_started_skip").live("click", function(evt){ + evt.preventDefault(); + $.ajax({ + type: "PUT", + url: "/users/#{current_user.id}", + data: {"user":{"getting_started":'false'}}, + success: function() { window.location = "#{root_path}"} + }) + }); + .span-8.append-1.last %h1{:style => "text-align:right;"} = "Welcome to Diaspora!"