front and back-end web development, Leeds, UK


Richard's Blog - Design, coding and life in Japan

Richard

Ruby on Rails

Why you should use Rails 3 and not Django

I wrote a blog post recently titled 'Django vs Rails' and I had a lot of people read it. In the post I was very much more pro Django, but I do believe Rails 3 changes the outlook somewhat. Over the summer I was able to go to Euro-Python in Birmingham, UK and RubyConf in Tsukuba, Japan.

Tags:

Django vs Rails

 Yes it is another one of those comparison blog posts! I apologize but I had to write something about this.

Tags:

Get an array of associations for a rails model

This one got me stuck as I couldn't see any such methods in the ActiveRecord API, but with a little help from Google Ruby on Rails: Talk group I managed to work it out.

ClassName.reflect_on_all_associations.collect {|assoc| assoc.name}

Easy as that

Tags:

Testing output JSON data from a RESTful API with Cucumber

Some of the following is in Japanese so please excuse this a little, but I am setting up an Restful API in Rails that outputs JSON data, I wanted to check the multi-level JSON objects contained specific data.

Tags:

Using :include in Rails ActiveRecord call doesnt create a joins query

I am currently writing an Rails app that uses quite a few database calls. I wanted to cut these calls down so I knew I would need to use the :include option in ActiveRecord. I was expecting from what Ryan Bates mentioned in one of his RailsCasts that a nice join would be created for me in one query.

Tags:

Recent Blog Posts

Syndicate content