Enough ClearType! Go GDI++!
Did you ever want to replace the ugly ClearType with something better? I know I have. And my prayers have been answered - meet GDI++ - the solution to all your font problems. Enough words, see it in action (this is Verdana, btw):
Well, I think that the difference is pretty obvious. So if you are ready to start you new font life - go here and download the file named gdi0870.zip (404kb). Extract anywhere you want and launch gditray.exe. Choose 'enable' from the context menu of the tray icon and voila - your font are rendered without the help of that ugly, ugly ClearType.
RoR: Session / login management
This is basic yet not obvious in Ruby on Rails - I've been looking for info on this for a long time (a long time for this problem is anything more than 5 minutes).
So, this is the way you make sessions/logins work in ruby:
class SessionController < ApplicationController
def login
@session['logged'] = true
end
def logout
@session['logged'] = false
end
end
The @session variable is available anywhere. Use it anywhere. For example you could come up with the following view showing whether the user is logged in:
<p>Logged in: <%= @session['logged'] %> </p>
And that is it. Anything beyond that (like adding a User model etc.) is out of this post's target. There are many articles on those things yet no clear explanation where to find and how to init a session. As you can see - the answer is clear - you don't
The session is already there. Just start using it.
