Isotope Plugin

Jquery.isotope.js A jquery plugin to organize the Grids and shuffle the grids automatically based on the height and width of the container. Advantages It has different layouts that we can use to organize the grids in the way we want. Also enables us to extend the existing layouts extensively to suite our needs. It allows us to filter the grids based on the properties of grid. eg: "All employees, Male Employees, Female Employees" We can also order the grids based on priorities. From the above example, we can order employees based on their age( Male Employees

Rufus-Scheduler

Simple scheduler that runs periodically. Code is Really Simple. scheduler = Rufus::Scheduler.start_new scheduler.in '20m' do puts "order ristretto" end The Usage is Really Simple In Rails Environment. I'll take the example of Rake task First. I will try to create a resque:work like task. task :my_scheduler_work => :environment do scheduler = Rufus::Scheduler.start_new scheduler.in '20m' do User.call_some_method end end Doing This in an non rails Env. For Ex: abcd.rake require 'rake' # require 'abcd' # File with all the classes and libs that are needed for rake task to run. task

Setting attribute values in active records.

This is an awesome link on how to setup attributes on ActiveRecord LINK: 5-ways to set attributes And I want to mention one trick about active record: When we try to assign a value to active record object like class A In case of any queries, post your queries in comments.

Log user out of the facebook when user logs out of the application.

As per the facebook policies we need to log the user out of the facebook when he clicks sign\_out in the app. To achieve this there are many ways, some of them got deprecated. One way that is suggested by facebook is to use their [Facebook Javascript SDK (Facebook Javascript sdk)][1] Codes: [Logout of facebook in rails(Logout of facebook in rails)][2] I used following code in document ready to achieve this functionality. window.fbAsyncInit = function() { FB.init({ appId: window.fb_app_id, status: true, cookie: true, xfbml: true, oauth: true }); $('#sign_out').click(function(e)

Mechanize- Automating browser navigation's through Script

Mechanize Mechanize - Advantages Basically mechanize is capable of navigating through the websites by logging into the site by form submission, clicking the links, maintaining session data, capturing the redirects. We can use this series of scripts to perform a desired operation in a Web application through mechanize script. Mechanize - Missing parts Right now mechanize doesn't support the javascript execution within the mechanize, So mechanize team is adding javascript support to mechanize for future versions. Workaround - We need to simulate javascript functions and calls in ruby methods and call those methods for appropriate actions. [Complete doc - Mechanize]

Polymorphic_url

Generate Polymorphic urls from unknown model. [link][1] [1]: http://viget.com/extend/using-polymorphic-url-to-dynamically-generate-urls-from-unknown-models

BROWSERQUEST

Mozilla Browser quest link

Callbacks.

This is a good reference for Active record callbacks. [link to callbacks][1] [1]: http://api.rubyonrails.org/classes/ActiveRecord/Callbacks.html

Issue with Excon Gem.

On "Bundle exec rake assets:precompile", we received an error like,"Rake aborted" and No clue about the problem that created this issue.But on the line which this error was thrown had its reference to excon gem which was running smoothly few days ago. Basically the issue was with recent bundle update, which updated the excon gem from 0.9.5 to 0.9.6 in Gemfile.lock which maintains all dependencies. So inclusion of excon gem with version number 0.9.5 fixed the issue.