Archive for February, 2009

Thursday, February 19th, 2009

Using ActiveScaffold in Rails 2.2 after using default scaffolding

Problem
You want to use ActiveScaffold in Rails 2.2, in a model that you have created using the standard Rails scaffolding script.
Solution

Install the ActiveScaffold plugin:
script/plugin install git://github.com/activescaffold/active_scaffold.git -r rails-2.2

In your layout (model or application for all models) add the following:

In your controller file delete all the standard scaffolding code and add one line, so that your [...]

No Comments » - Posted in ruby on rails by kosmas

Monday, February 16th, 2009

Comparing data from two big MySQL tables

Problem
You have two big tables in MySQL (>640K records), that maybe differ in the number of fields, but you want to make sure that the data in the common fields in both tables are the same.
Solution

Use mysql to export the data from the first table in a csv file, selecting only the common fields.
We use [...]

No Comments » - Posted in MySQL, linux by kosmas