Cool, then.. i was only trying to learn more of a possible benefit of doing that though!.<div><br></div><div>All in all thanks ! <br clear="all"><div>--</div><div><br></div>Ikenna<br>
<br><br><div class="gmail_quote">On Thu, Feb 23, 2012 at 4:47 PM, Richard Livsey <span dir="ltr"><<a href="mailto:richard@livsey.org">richard@livsey.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Yeah, authenticate_with_password would probably take a username and password if done in reality, passing round the params hash isn't very nice. In reality if using OmniAuth/similar you'd probably pass the auth_hash through instead of params.<br>
<br>
In the end it's not really about authentication more a case of illustrating the refactoring side of things, so I admit I may have 'cheated' a bit by knowing the outcome when I started off writing the first example :o)<br>
<br>
Glad you enjoyed it!<br>
<div class="im"><br>
<br>
On Thursday, 23 February 2012 at 16:34, Okpala Ikenna N. wrote:<br>
<br>
> Jus finished reading your post.. to put long short.. "Brilliant".<br>
><br>
> i am wondering why you have choosen to allow authenticate_with_password(params) to be aware of opening up the params hash.<br>
><br>
> --<br>
><br>
> Ikenna<br>
><br>
><br>
</div><div class="im">> On Thu, Feb 23, 2012 at 4:03 PM, Richard Livsey <<a href="mailto:richard@livsey.org">richard@livsey.org</a> (mailto:<a href="mailto:richard@livsey.org">richard@livsey.org</a>)> wrote:<br>
> > I've written up my notes for the lightning talk I gave on refactoring:<br>
> ><br>
> > <a href="http://livsey.org/blog/2012/02/23/should-your-user-care-about-authentication/" target="_blank">http://livsey.org/blog/2012/02/23/should-your-user-care-about-authentication/</a><br>
> ><br>
> > Hopefully it is of interest to someone!<br>
> ><br>
> > Cheers.<br>
> ><br>
> > --<br>
> > Richard Livsey<br>
> > Co-Founder, MinuteBase<br>
> > Meeting collaboration made easy<br>
> > <a href="http://minutebase.com" target="_blank">http://minutebase.com</a><br>
</div>> > <a href="tel:%2B44%20%280%29%207841%20260%20797" value="+447841260797">+44 (0) 7841 260 797</a> (tel:%2B44%20%280%29%207841%20260%20797)<br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > Chat mailing list<br>
> > <a href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a> (mailto:<a href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a>)<br>
> > <a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" target="_blank">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br>
><br>
><br>
> _______________________________________________<br>
> Chat mailing list<br>
> <a href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a> (mailto:<a href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a>)<br>
> <a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" target="_blank">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br>
<br>
<br>
<br>
</blockquote></div><br></div>