mirror of
https://github.com/diaspora/diaspora.git
synced 2026-04-29 03:01:03 -04:00
skip getting started button sets getting_started to false via js and redirects to root_path
This commit is contained in:
@@ -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!"
|
||||
|
||||
Reference in New Issue
Block a user