summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorshumakl <shumakl@purdue.edu>2014-04-03 12:43:31 -0400
committershumakl <shumakl@purdue.edu>2014-04-03 12:43:31 -0400
commitafaeb054e6ac35c186af9c563f85f8ac58076b81 (patch)
treef04d294b116049408a97df58a60494e021ee947a /app/helpers
parent4015a27f66eafee66137bc27a76843bd48139772 (diff)
fix auto-indent mess up
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/sessions_helper.rb67
1 files changed, 31 insertions, 36 deletions
diff --git a/app/helpers/sessions_helper.rb b/app/helpers/sessions_helper.rb
index 5a238a0..9be3abc 100644
--- a/app/helpers/sessions_helper.rb
+++ b/app/helpers/sessions_helper.rb
@@ -6,8 +6,8 @@ module SessionsHelper
#place token inside of the browser
cookies.permanent[:remember_token] = remember_token
#save the hashed token to the database
- user.update_attribute(:remember_token,
- User.hash(remember_token))
+ user.update_attribute(:remember_token,
+ User.hash(remember_token))
#set the current user to be the given user
self.current_user = user
end
@@ -37,37 +37,32 @@ module SessionsHelper
self.current_user = nil
end
- =begin
-
- This is for anyone that cares about how long a user is signed
- in:
-
- Currently I have a user to be signed in forever unless they
- log out (cookies.permanent....).
-
- If you want to change that, change line 7 to this:
-
- cookies[:remember_token] = { value: remember_token,
- expires: 20.years.from_now.utc }
-
- which will expire the cookie in 20 years from its date of
- creation.
-
- Oddly enough, this line above is equivalent to the:
-
- cookies.permanent
-
- This is just a short cut for this line since most people
- create permanent cookies these days.
-
- Other times are:
-
- 10.weeks.from_now
-
- 5.days.ago
-
- etc...
-
- =end
-
- end
+ # This is for anyone that cares about how long a user is signed
+ # in:
+ #
+ # Currently I have a user to be signed in forever unless they
+ # log out (cookies.permanent....).
+ #
+ # If you want to change that, change line 7 to this:
+ #
+ # cookies[:remember_token] = { value: remember_token,
+ # expires: 20.years.from_now.utc }
+ #
+ # which will expire the cookie in 20 years from its date of
+ # creation.
+ #
+ # Oddly enough, this line above is equivalent to the:
+ #
+ # cookies.permanent
+ #
+ # This is just a short cut for this line since most people
+ # create permanent cookies these days.
+ #
+ # Other times are:
+ #
+ # 10.weeks.from_now
+ #
+ # 5.days.ago
+ #
+ # etc...
+end