Ben Roesch's Blog

Mapping Rails Errors in a Restkit-based iOS App

We used RestKit to build 55Prophets (available in the app store). Restkit's readme page has some instructions for mapping error responses, but I ran into several problems along the way, so I came up with my own setup for taking errors that come out of our back end and presenting them to a user. To start, I created a class called ErrorCollection... Read more

Creating View Controllers for Deep Linked iOS Apps

While building 55Prophets for iOS (you can download it here), I wanted to allow deep linking into the app. For example, I wanted users to be able to share links to specific questions. When someone accessed the link, I wanted the app to take them directly to that question, instead of dropping them into the home screen that appears on a normal app... Read more

Judicious execution of Javascript in a Rails app

When you start a new rails app, you get a new javascript file for each controller that you scaffold. Assuming that you're using the asset pipeline, these will all get concatenated into a single file called application.js. This results in all of your javascript being executed by the browser each time the file is pulled down. In many cases, I woul... Read more