Category Archives: Conventions

A smarter Rails url_for helper

Problem In my Rails application, I want to be able to determine a URL for any given model, without the calling code having to know the type of the model. Instead of calling post_path(@post) or comment_path(@comment), I want to just … Continue reading 

Also posted in Design | 1 Comment

Convention over lots of code

I’m in the middle of writing my last FubuCore series post before I proceed to the FubuMVC series of posts.   The post is called “Stringification” (String-eh-feh-k-shun) and it’s about using conventions to remove a lot of code that deals with … Continue reading 

Also posted in .NET, FubuMVC | Comments Off

Teaching AutoMapper about our conventions

I often need to send data from my entities to the client in JSON format to enable rich AJAX functionality. It isn’t practical to serialize the entities directly, so they are first flattened to a data transfer object (DTO) before … Continue reading 

Also posted in .NET, Misc | 2 Comments