
attractive, usable web applications
Richard's Blog - Design, coding and life in Japan
Ruby on Rails
Django vs Rails
Submitted by Richard on Fri, 04/23/2010 - 13:47Yes 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
Submitted by Richard on Tue, 01/26/2010 - 10:05This 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
Submitted by Richard on Mon, 11/02/2009 - 14:27Some 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
Submitted by Richard on Tue, 10/27/2009 - 20:37I 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:
Awesome ruby tricks..
Submitted by Richard on Wed, 10/21/2009 - 13:04Found this link yesterday... Awesome
21 Ruby Tricks You Should Be Using In Your Own Code
Tags:
Recent Blog Posts
- Doctrine 2 and why you should use it! 29th Jul 10, 15:23
- How to localize your main blog listing page using Drupal 26th Jun 10, 11:46
- Creating Rails like template helpers in Django 24th Jun 10, 22:01
- Error: No module named messagesdjango.contrib.contenttypes 22nd Jun 10, 22:00
- Creating multiple blocks easily in a Drupal module pt2 8th Jun 10, 14:12