moved getting started logic to the controller
This commit is contained in:
parent
e69da7c5e8
commit
c86a3eb608
2 changed files with 5 additions and 8 deletions
|
|
@ -79,6 +79,11 @@ class UsersController < ApplicationController
|
||||||
|
|
||||||
@step = ((params[:step].to_i>0)&&(params[:step].to_i<5)) ? params[:step].to_i : 1
|
@step = ((params[:step].to_i>0)&&(params[:step].to_i<5)) ? params[:step].to_i : 1
|
||||||
@step ||= 1
|
@step ||= 1
|
||||||
|
|
||||||
|
if @step == 4
|
||||||
|
@user.getting_started = false
|
||||||
|
@user.save
|
||||||
|
end
|
||||||
render "users/getting_started"
|
render "users/getting_started"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,14 +3,6 @@
|
||||||
-# the COPYRIGHT file.
|
-# the COPYRIGHT file.
|
||||||
|
|
||||||
|
|
||||||
- if current_user.getting_started == true
|
|
||||||
:javascript
|
|
||||||
$.ajax({
|
|
||||||
type: "PUT",
|
|
||||||
url: "/users/#{current_user.id}",
|
|
||||||
data: {"user":{"getting_started":'false'}}
|
|
||||||
})
|
|
||||||
|
|
||||||
%h1
|
%h1
|
||||||
= "You're all set up, #{current_user.person.profile.first_name}!"
|
= "You're all set up, #{current_user.person.profile.first_name}!"
|
||||||
.description
|
.description
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue