maxlapshin / single_primary_key
- Source
- Commits
- Network (0)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Branch:
master
| name | age | message | |
|---|---|---|---|
| |
README | Tue Sep 16 03:44:11 -0700 2008 | |
| |
init.rb | Tue Sep 16 03:44:11 -0700 2008 | |
| |
lib/ | Sat Sep 27 04:45:26 -0700 2008 |
README
Author: Max Lapshin <max@maxidoors.ru> This plugin maintains unique primary key ID through ALL of your models 1. ./script/plugin install git://github.com/maxlapshin/single_primary_key.git 2. ./script/generate migration single_id 3. Replace contents of migration class with extend SinglePrimaryKey::Migration, i.e.: class SingleId < ActiveRecord::Migration extend SinglePrimaryKey::Migration end 4. rake db:migrate 5. voila! MySQL and Postgres now will have unique ID. Thus you can safely use LEFT JOIN with polymorpic associations.
