front and back-end web development, Leeds, UK

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



Awesome ruby tricks..

Found this link yesterday... Awesome
21 Ruby Tricks You Should Be Using In Your Own Code


SQLite3::SQLException: SQL logic error or missing database:

I found the following error in one of my unit tests

SQLite3::SQLException: SQL logic error or missing database: 

I had a quick look on google and found the following blog post


JSON Data for multiple objects and associations in Rails

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


form = Form.find(params[:id])
products = Product.all


Using an alias method with an abstract class model in Ruby on Rails

I 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!


Stripes in Japanese UTF8

I have finally got working with stripes and I must say I love it (So Far) I know not much beats the beauty of ROR but having come from a PHP background I must say stripes seems to make much more sense (to me anyway)

As always when I start a new project in something new I am plagued by language issues as I work mostly in Japanese. But these issues have been smooth and easy to fix.

First Tomcat - I needed to add all of the language filtering and settings that tomcat suggests.


Recent Blog Posts

Syndicate content