This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb | |
index fd6d5d8..94ff627 100644 | |
--- a/app/controllers/application_controller.rb | |
+++ b/app/controllers/application_controller.rb | |
@@ -18,7 +18,7 @@ class ApplicationController < ActionController::Base | |
def user_authentication | |
return true if @current_user | |
if session[:user_id] | |
- @current_user = User.find(session[:user_id]) | |
+ @current_user = User.find_by_id(session[:user_id]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb | |
index fd6d5d8..d1e9ce0 100644 | |
--- a/app/controllers/application_controller.rb | |
+++ b/app/controllers/application_controller.rb | |
@@ -18,8 +18,8 @@ class ApplicationController < ActionController::Base | |
def user_authentication | |
return true if @current_user | |
if session[:user_id] | |
- @current_user = User.find(session[:user_id]) | |
- return true if @current_user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn read_slice(&mut self, dst: &mut [u8]) -> usize { | |
let mut off = 0; | |
let len = cmp::min(dst.len(), self.remaining()); | |
while off < len { | |
let mut cnt; | |
unsafe { | |
let src = self.bytes(); | |
cnt = cmp::min(src.len(), len - off); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am fkr on github. | |
* I am fkr (https://keybase.io/fkr) on keybase. | |
* I have a public key whose fingerprint is 5F4D 9B06 C240 3250 35BF 66ED 1AD3 A9B8 7A0B 612C | |
To claim this, I am signing this object: |