← back to the blog
fousa archive
| JAN | FEB | MRT | APR | MAY | JUN | JUL | AUG | SEP | OCT | NOV | DEC | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2010 | 8 | 15 | 24 | 5 | 1 | |||||||
| 2009 | 15 | 13 | 3 | 2 | 2 | 1 | 4 | X | 5 | 5 | 6 | |
| 2008 | 1 | 5 |
Things I didn't know about migrations // 1 comment
UPDATE EVERY EXISTING RECORD After you altered your table and added for example a column. You can tell the migration to update every record already in the altered table with a value defined by you. def self.up change_table :products do |t| t.boolean :price_available, :default => false end Product.update_all ["price_available ...
Merb, a fast Ruby framework
Merb is a lightweight Ruby framework that has basically the same functionality as Ruby on Rails, but is much faster! The big difference is that Merb has a small core, javascript, template engines and database connections are plugged in and not added to the basic core. WHY MERB? Merb is thread safe. Merb can handle multiple file uplo...
Haml, another templating engine // 2 comments
Haml (HTML Abstraction Markup Language) is another templating engine for Ruby on Rails/Merb. Before I used erb, but after a while my template started to look very messy, and I wanted to clean it up. Haml is a great way to do this! This is how you install it on your system: > sudo gem install haml Next you have to activate the haml p...
Sinatra, rapid web development // 1 comment
Sinatra is a great way to use ruby for rapid web development! When you just need to create a simple website for a small company of just for a friend. Below is a small example on how to use it! A SIMPLE WEBAPP Installing sinatra on your server is very easy, just type in the following: > sudo gem install sinatra After that you h...
Thin, a fast and simple web server // 1 comment
For some strange reason my mongrel server doesn't seem to be running on Snow Leopard. When I start my rails server with the following command it takes forever... > ./script/server Using webrick resulted in the same slow startup, but less slow then mongrel tough! Don't know, don't care what Snow Leopard did! But I need to get to t...
I found a nice simple article on how to use the dynamic find methods in ActiveRecord. The guys from