Skip to content
Extraits de code Groupes Projets
Valider 335bd9c9 rédigé par danielvincent's avatar danielvincent
Parcourir les fichiers

skip getting started button sets getting_started to false via js and redirects to root_path

parent b906dd5a
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -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
......
......@@ -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!"
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter