Ruby and Rails
Date format
Format a date in ruby using the string from time method (strftime).
Format options:
%a - The abbreviated weekday name (“Sun”)
%A - The full weekday name (“Sunday”)
%b - The abbreviated month name (“Jan”)
%B - The full month name (“January”)
%c - The [...]
Ruby on Rails for RHEL 5
Here is the quick and dirty Ruby on Rails setup for Redhat Enterprise Linux v5 with MySQL.
Using yum install ruby and mysql. The command below does not list all the required packages, but due to dependencies, the additional packages will be installed (or should be - this is all from memory).
Reduce database connections using :include
When displaying a list that requires information from several tables in the database, you can sometimes end up with three or more database queries per list row. Depending on the situation, this may not be a problem. However, it is possible to join the tables in one large SQL query using the :include [...]
