Jun 20, 2015

Configuring web-mode with JSX

I use web-mode for editing different templates like html, .erb, .js.jsx. It understands React’s JSX tags also which is great because I don’t need a separate mode just for JSX.

Jul 23, 2014

Weirdness of Bigdecimal.new

Recently i was bitten by this weirdness of BigDecimal in Ruby.BigDecimal.new excepts initial value and number of significant digits. In one of my app, BigDecimal.new was called with string initial

Jul 20, 2014

Setting up ispell and Emacs on Mac OS X

I was trying to setup flyspell mode on new Mac and whenever i doflyspell-buffer but Emacs was throwing error -Problem - Flyspell does not work with Emacs. Can't find ispell. Mac OS X

Feb 23, 2014

Devise : Passing params to after_* paths

Devise allows us to customize after_signup_path by overriding a protectedmethod in RegistrationsController.class RegistrationsController < Devise::RegistrationsController protected def after_inactive_sign_up_path_for(resource) your_custom_path end def

Jan 19, 2014

VERP on Rails

We sent newsletter campaigns from our Rails app. One of the main requirement of such campaign is how many emails bounced?. We need to track all bounced emails and map them again to

Jan 18, 2014

jQuery append and clone

I was trying to append some part of the DOM to some other element of the page.<div id='container'> <ul class='contacts_list'> </ul> </div&

Dec 21, 2013

Enable minitest again

If you have skipped minitest/test-unit while creating a rails app with -T or want to move to minitest from rspec or want to start with minitest in an existing rails project without

Oct 26, 2013

Facebook app with multiple subdomains

I had a requirement of adding facebook integration with our Rails app. I am using omniauth-facebook gem for the authentication part and it works great.Our app has multiple subdomains for all clients,