Monthly Archives: June 2006

Ruby On Rails Controller Path

With Ruby on Rails, you can redirect to or link to an action in different controller. For example, to redirect to the login action in the account controller you can use the following from withing a controller in you rails application: redirect_to :controller => ‘account’, :action => ‘login’ When this redirect statement is executed you [...]

Posted in Ruby, TechKnow | Leave a comment

Belated Spring Cleaning

I was reorganizing and cleaning my technical bookshelf earlier today. I have a whole bunch of books that I don’t use and are just taking space. I want to donate some of these books to my local library, maybe up and coming techies will get some use out of them. Some of these books are [...]

Posted in Books, Programming, Rant, TechKnow | Leave a comment

Query Managed Auto Increment

Different database vendors allow you to auto increment an integer primary key in different ways. I thought that I could manage to increment the primary key from within the same insert statement. Given the following table: CREATE TABLE temps ( id INT NOT NULL, name VARCHAR(10) NOT NULL, PRIMARY KEY (id) ); I thought could [...]

Posted in SQL, TechKnow | 2 Comments

Rails Single Table Inheritance

Ruby on Rails supports Single Table Inheritance. Single Table Inheritance allows you to have one single SQL table, such as an employees table, manage different type of employees like managers and developers. A manager would normally have more responsibilities than a developer and you can separate these additional responsibilities in a different ActiveRecord model class. [...]

Posted in Programming, Ruby, TechKnow | 13 Comments