Overriding to_s method for BigDecimal instance

requirement was to display decimal numbers which are having scale values present to be displayed in decimal format otherwise display them as integer. Output expected 12.23 => 12.23 12.00 => 12 While rendering any object on html page by default "to_s" method gets executed.So, i overwrote "to_s" method of BigDecimal class as below. Anyone having … Continue reading Overriding to_s method for BigDecimal instance

Uploading multiple files with nginx upload module and upload progress bar

Uploading files 'efficiently' has also been a pain point in most apps. I finally got to experiment with: nginx upload module (http://www.grid.net.ru/nginx/upload.en.html) nginx upload progress module http://wiki.nginx.org/NginxHttpUploadProgressModule) and upload multiple files via paperclip. There are resources available for handing these individually but not together. I used references from here and here. It is advisable to … Continue reading Uploading multiple files with nginx upload module and upload progress bar

Twinkle + FF Setup (Click To Call) using telify

On linux machine following settings needs to be done in order to get in browser calling enabledfor phone numbers.Installation setup1. Install twinkle setup (Create user profile) and get it working for outgoing and incoming calls2. Install telify add-on (can be un-installed once completed with all settings)3. Copy wrapper script twinkle_tel) click here to download and … Continue reading Twinkle + FF Setup (Click To Call) using telify