
attractive, usable web applications
Richard's Blog - Design, coding and life in Japan
Ruby on Rails
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:
JSON Data for multiple objects and associations in Rails
Submitted by Richard on Tue, 10/20/2009 - 08:58I am creating a REST API in Rails which outputs JSON data. In some cases I need multiple objects to be pushed out in the data, which is fine until you need to use associations in the mix also.
Example:
form = Form.find(params[:id]) products = Product.all
Tags:
Using an alias method with an abstract class model in Ruby on Rails
Submitted by Richard on Sat, 10/17/2009 - 14:24I was surprised about how easy and nice this solution was, I needed a separate model to manage 2 different kinds of sessions in my rails project. A regular user session and a cart specific user session. I don't know if this is the best way to organize my data but it is a legacy system that is built that way!
Tags:
Little request for Ruby on Rails
Submitted by Richard on Thu, 10/15/2009 - 08:24One thing that drives me mad about rails since I am not using it everyday is forms.
Although I love it to pieces why do you need 2 types of form helper (one for forms wrapped around an object and one for not). Although after a little time you find yourself remembering which is which.
But Why?
Rails is supposed to save pain which it usually does, but I find form helpers in other frameworks far easier to use as I don't have to think about these different helpers. Lets hope they fix it in Rails 3.
Tags:
Recent Blog Posts
- Why you should use Rails 3 and not Django 5th Sep 10, 12:28
- 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