lukebaker.org

lukebaker.org

Install

with one comment

Installation Steps

  1. Create your database and tables, if you haven’t already. (remember use Rails’ conventions for table and column names)
  2. Download recent ActiveRecord release or
    svn co http://lukebaker.org/svn/repos/activerecord/trunk/ activerecord
  3. Untar into a models/ directory within your project or move checked out directory activerecord/ into your models/ directory.
  4. There should now be a models/activerecord/ directory, edit models/activerecord/config.php to your liking.
  5. Run models/activerecord/generate.php
  6. This should have have generated model stubs inside your models/ directory. Edit these model files to tell ActiveRecord about the relationships between tables. Do not edit *Base.php files as they get overwritten every time you run generate.php
  7. Use ActiveRecord, by including the models that you want to use:
    require_once ‘models/Post.php’;

Written by Luke

September 24th, 2007 at 3:31 pm

Posted in

One Response to 'Install'

Subscribe to comments with RSS or TrackBack to 'Install'.

  1. Been having some pretty big issues when PHP has error reporting on. When set to E_ALL there are a number of variables that aren’t checked with isset or some just fail completely even though they are declared. Any thoughts on this?

    Are you still updating these classes?

    Brent

    8 Jan 09 at 4:08 pm

Leave a Reply