Josh Software

Ruby on Rails

josh ruby

Dynamic roles and permissions using cancan – Josh Software

Dynamic roles and permissions using cancan – Josh Software Prasad Surase 2012-10-23 08:28:16 Most of us already use cancan for authorization, where we define the Role Based Access (RBAC) to various models in the Ability class. However, any changes to these abilities, requires code changes to the Ability class and restarting the application for the …

Dynamic roles and permissions using cancan – Josh Software Read More »

josh ruby

Migrating to new Heroku Postgres plans – Josh Software

Migrating to new Heroku Postgres plans – Josh Software Sameer Tilak 2012-08-28 14:29:09 Recently Heroku released new version of postgres 9.1 with new price plans. A notice was send to all users to migrate from there existing share database to new planes released with Postgres 9.1. In these new plans concept of limit on using …

Migrating to new Heroku Postgres plans – Josh Software Read More »

josh ruby

Designing Rails API using Rabl and Devise – Josh Software

Designing Rails API using Rabl and Devise – Josh Software Most of us are aware that enabling API access for rails application is easy as Rails provides RESTful APIs by default. However, a little complexity arises when some responses are expected in xml format (maybe for some legacy system) and JSON format. Complexity increases when …

Designing Rails API using Rabl and Devise – Josh Software Read More »

josh ruby

Payment Gateway testing using webmock – Josh Software

Payment Gateway testing using webmock – Josh Software Testing the payment gateway involves lots of scenarios like what should happen if exception is raised while doing payment. To test this scenario we have to call payment gateway API and take response. But herein lies a problem. The test code you have written may work sometime …

Payment Gateway testing using webmock – Josh Software Read More »

josh ruby

Stubbing Geo-location requests using webmock – Josh Software

Stubbing Geo-location requests using webmock – Josh Software Geo-location integration is common today for every web application. We have gems on hand, to integrate Geo-location to our application. With few steps of configuration we can Geo-code our attributes ie., user addresses. But testing Geo-coding integration takes much more time than development! We currently use Google …

Stubbing Geo-location requests using webmock – Josh Software Read More »