Mar
19
awarded Inquisitive
Mar
16
awarded Supporter
Mar
16
comment Convert binary search tree into ordered linked list
You could shorten the result further by doing this: def T(p,q=None): if not p:return q; p.r=T(p.l,T(p.r,q)); r.l=p; return r
Mar
16
revised Flatten binary search to in order singly linked list [C]
added 5 characters in body
Mar
16
answered Flatten binary search to in order singly linked list [C]
Jan
12
revised How to bookmark the whole file in Vim, not a specific line?
added 4 characters in body
Jan
12
accepted How to bookmark the whole file in Vim, not a specific line?
Jan
12
comment Method definition and naming conventions in Ruby
In @hattenn's code user is looked up by email (and you've changed that). So I believe it's something quite specific to password resetting and should be in PasswordResetsController. params[:id] can also contain some reauthentication token, I am not sure, but anyway most likely it does not make sense outside of PasswordResetsController as well. So I'd suggest to move that all back to the PasswordResetsController.
Jan
12
comment Method definition and naming conventions in Ruby
I agree, that this way of accessing user is better than initializing it in before_action. I believe, before_action should only contain some "cross-cutting" functionality that is easily can be plugged in or unplugged, depending on requirements (changing the functionality, but not affecting the workability of other code). However, you cannot unplug find_user as most likely some code will break after that.
Jan
12
revised Method definition and naming conventions in Ruby
replaced `before_filter` with newer `before_action`
Jan
12
revised Vim : replacing entire word based on partial match search on all lines
added details
Jan
12
revised Vim : replacing entire word based on partial match search on all lines
grammar fixes
Jan
12
asked How to bookmark the whole file in Vim, not a specific line?
Jan
7
awarded Popular Question
Dec
31
awarded Nice Question
Dec
30
awarded Student
Dec
30
awarded Supporter
Dec
25
awarded Supporter
Dec
25
awarded Informed
Nov
13
awarded Nice Answer
1 2 3 4 5