Posts about HowTo
HOWTO: Better JSON parsing when POSTing to Merb Apps
Oct 10, 2008
Where I work, we have fairly extensive, JSON-based web services in all out applications. As a quick example, here's what you would get if you were to GET
http://config.ssbe.example.com/configurations/90
with the mime-type application/vnd.absperf.sscj1+json
:
HOWTO: Exception Handling in Merb
Oct 1, 2008
Our app is very (JSON) web-service heavy, and so having helpful error messages in our web service documents is pretty important. Luckily, Merb makes this, like everything, a metric shitton easier than it is in rails. There are a couple poorly documented things I had to stumble through, so I thought I would write some up on how to do this.
HOWTO: Getting a sidebar in Merb
Sep 16, 2008
In several of my pages, I have a side-bar menu-y thingie. I didn't want to have to rewrite a controller-specific layout each time, but luckily Merb supports something similar to Rails's content_for block that I wrote about earlier. In Merb, its done using throw_content
(API) and catch_content
(API).
HOWTO: DataMapper - Setting the default repository for a model
Aug 29, 2008
Had to google for quite a while before I was able to find the solution. Essentially, I have a model that I want to always use a different repository than what I #setup
in :default
. To do that: