My Blog

All about my activities, Ideas and everything.

Rails lost session after doing a POST

I might be the only silly person on the Internet, because I haven’t found anyone having the same problem as I had before. So, in the future there might be someone like me. Basically, you have a rails application, you didn’t realise that if you do a POST from a plain

without using

1
2
3
form_for(@some)
...
end

You might be losing the session because of the security reason. According to this reference

So, to be safe if you’re doing a POST don’t use plain
tag. Only use form_for to generate the from and rails will handle everything. You can proof this theory easily by commenting out

1
2
3
class ApplicationController < ActionController::Base
  #protect_from_forgery
end

Please don’t do this at production!

How to boost your old bold 9700.

If you’re like me, having an bold 9700 with OS6 and it’s getting slower. Don’t know what to do and want to buy a new phone but your pocket is not that deep. The truth is Bold 9700 isn’t designed for OS6, but who wants OS5 or even OS5. So after installing OS6 to your bold 9700 you will have probably around 68 MB left in your mobile memory. And after installing a couple of applications, such as Gmail, Facebook, Twitter and Whatsapp. You might have some left and once you use it for a day or two, your beloved phone starts to slow down as though you might want to throw it away and get an iPhone4.

There’s a way to increase some memory. It’s an application called Shrink-A-OS. The steps are very easy, choose your latest official firmware and install it to your computer. Then install BBHTool, run the program. BBHTool will detect the OS that you installed in your computer. Start ticking application that you don’t want, fonts, or languages that you can’t even read. Then click “Shrink My OS” button. It will show you how much memory you’ve saved. I saved almost 50-60 MB from the shrinking. I know there’s a button to Launch Loader, but it doesn’t work for me. So, you could just go to “C:\Program Files\Common Files\Research In Motion\AppLoader” and run Loader.exe then follow the steps and BAM! you got a faster, more memory bold 9700. Hope you enjoy!

Eliminate two Facebook accounts

I don’t know if you’ve ever seen or had this before, but it happened to me once. I woke up one they, just wanted to look at my status and how my friends were doing. I open http://www.facebook.com and I realised that I couldn’t log in to my Facebook account. WTF! Then I did everything I could, go to Facebook Help, Reset Password, googled lots of blogs. Then I gave up, I ended up creating a new Facebook account and found out that lots of people on the Internet had the same problems as I had. I tried emailing Facebook Help Centre as well and got some replies but nothing was helpful. Also, it was like seven months ago.

What I did was just beek reporting the other account, like Inappropriate profile picture, or this account pretends to be me. And then today, my other Facebook account has been deleted already. I’m happy!.