Active Record Callbacks in Rails

Originally posted on Srikanta :
Callbacks are a great technique for achieving simplicity and flexibility. Callbacks provide a means of hooking into an ActiveRecord object’s life-cycle. A hook is a technique that lets you trap some Ruby event with ActiveRecord, such as object creation. Callbacks are hooks that allow you to trigger logic before or after…

How to know scroll position reached bottom using jquery

Implemented as below: Suppose we have a “DIV” tag with some content, <div id=”scrollbox”> Lorem ipsum dolor sit amet <br> Consectetuer augue nibh lacus at <br> Pretium Donec felis dolor penatibus <br> Phasellus consequat Vivamus dui lacinia <br> Ornare nonummy laoreet lacus Donec <br> Ut ut libero Curabitur id <br> Dui pretium hendrerit sapien Pellentesque […]

‘Confirmation token is invalid’ when confirming after registering in Devise gem

I got stuck for sometime by getting the issue. When registering a new user with :confirmable in my devise user model, when the user clicks on the e-mail confirmation link, they receive an “Invalid confirmation token” error message Found some solution by searching about this, config.allow_insecure_token_lookup = true (Never do it in your devise initilizer […]

Windows 8.1 Is Now Available to Download

Originally posted on Tech:
As of 7am Eastern, Microsoft has started rolling out the Windows 8.1 update through the Windows Store. If it’s not available on your device right away, keep checking. It’s a free update for those of you with Windows 8 computers and tablets. Aside from several fixes and speed enhancements, Windows 8.1…

India to get iPhone 5s at Rs 54,000 and iPhone 5c at Rs 42,000

Originally posted on DailyTechPage:
The image above can be seen on airtel homepage Apple is launching its two new iPhones (iPhone 5s and iPhone 5c) in India on November 1 just before the festive season. A splendid move by Apple to improve its sales in India. Two leading Telecom operators Bharti Airtel and Reliance Communications will start selling iPhone 5s and iPhone 5c smartphones…

How to integrate MongoDB in rails 3.X

Mongodb MongoDB permits a one-to-one mapping between object-oriented (OO) software objects and database entities. MongoDB is a document database that focuses on developer needs. MongoMapper, a project by Jon Nunemaker from Github, is a simple ORM for MongoDB Mongoid, in particular, has become quite popular since its creation 4 years ago by Durran Jordan. Mongoid’s […]