fousa tag

Current tag: tag

2010

14 APR

European date text field plugin

This is a small plugin for when you want to use a textfield to enter a European formatted date like DD/MM/YYYY, and validate to this format. HOWTO Clone the plugin into your vendor/plugins directory like this: git clone http://github.com/fousa/european-date-text-field.git Next you should define the columns that need time conversi...

12 MAR

Usage of lambda in scopes // 2 comments

I was using scopes in Rails 3 to show my active blog posts. Lambda was used to make sure the Time is evaluated correctly when executing the scope. scope :active, lambda { where("created_at <= ?", Time.zone.now).sorted } scope :blog, active.limit(10) This works fine until I decided to add a blog post. The last blog ...

13 JAN

Migrating MySQL to PostreSQL // 4 comments

I never thought I had to do this but I'm migrating my MySQL database to PostgreSQL for my Rails application! The reason why is that I want to use the same type of database in development as in production. The reason for using PostgreSQL as a production DB is thanks to Heroku. This is a great hosting company! I had a few problems while migr...

go to the top ↑ ← back to the blog