Skip to content

{ Category Archives } Merb

Merbcamp

Here’s my own personal store of interesting crap I picked up in merbcamp. I’ll add to this as the talks go on.

carllerche is a pretty cool guy for adding useful stuff to the merb router for me mauth is pretty sweet When can I get a 4K tv in my living room? FiveRuns tuneup for merb webrat looks to [...]

Tagged ,

HOWTO: Better JSON parsing when POSTing to Merb Apps

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:

{ “_type”: [...]

Tagged , ,

HOWTO: Exception Handling in Merb

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 [...]

Tagged , ,

HOWTO: Getting a sidebar in Merb

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).

Put the catch_content into your application layout view. You probably [...]

Tagged , ,

Application-wide Config loader for Merb Apps

I saw this post by Stephen Bartholomew and thought that it was a pretty neat idea, so I adapted it for Merb applications. Merb already has the Merb::Config for storing config options, so I just added the config options to that, rather than the AppConfig class used in Steve’s post. That also greatly simplifies its [...]

Tagged ,