moved getting started logic to the controller

This commit is contained in:
zhitomirskiyi 2010-10-31 19:33:11 -07:00
parent e69da7c5e8
commit c86a3eb608
2 changed files with 5 additions and 8 deletions

View file

@ -79,6 +79,11 @@ class UsersController < ApplicationController
@step = ((params[:step].to_i>0)&&(params[:step].to_i<5)) ? params[:step].to_i : 1
@step ||= 1
if @step == 4
@user.getting_started = false
@user.save
end
render "users/getting_started"
end

View file

@ -3,14 +3,6 @@
-# the COPYRIGHT file.
- if current_user.getting_started == true
:javascript
$.ajax({
type: "PUT",
url: "/users/#{current_user.id}",
data: {"user":{"getting_started":'false'}}
})
%h1
= "You're all set up, #{current_user.person.profile.first_name}!"
.description