appoxy_sessions 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,6 +9,11 @@ module Appoxy
9
9
  session[:user_id] = nil # keeps the session but kill our variable
10
10
  end
11
11
 
12
+ def logout
13
+ @current_user = nil
14
+ reset_session
15
+ end
16
+
12
17
 
13
18
  def logged_in?
14
19
  #puts 'logged_in??'
@@ -80,6 +80,12 @@ module Appoxy
80
80
 
81
81
  end
82
82
 
83
+ def destroy
84
+ logout
85
+ flash[:info] = "You have been logged out."
86
+ redirect_to('/')
87
+ end
88
+
83
89
  end
84
90
  end
85
91
  end
@@ -0,0 +1,21 @@
1
+ module Appoxy
2
+
3
+ module Sessions
4
+ module SessionsController
5
+
6
+
7
+ def new
8
+
9
+ @user = User.new
10
+ @user.email = params[:email] if params[:email]
11
+ @user.activation_code = params[:ac]
12
+
13
+ end
14
+
15
+ end
16
+
17
+ end
18
+
19
+
20
+ end
21
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appoxy_sessions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Travis Reeder
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-02-03 00:00:00 -08:00
12
+ date: 2010-02-04 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -45,6 +45,7 @@ files:
45
45
  - lib/sessions/application_controller.rb
46
46
  - lib/sessions/sessions_controller.rb
47
47
  - lib/sessions/user.rb
48
+ - lib/sessions/users_controller.rb
48
49
  - README.markdown
49
50
  has_rdoc: true
50
51
  homepage: http://www.appoxy.com