search for: createprior

Displaying 1 result from an estimated 1 matches for "createprior".

Did you mean: createerror
2006 May 26
7
migration with required data
I''m working on a bugtracker application in rails. I have a Bug model and I want to add a Priority to the mix. A Bug can have one priority. I generate a Priority model, modify my Bug model with a belongs_to :priority and create my migration like so: class CreatePriorities < ActiveRecord::Migration def self.up create_table :priorities do |t| t.column :name, :string, :limit => 25, :null => false end add_column :bugs, :priority_id, :integer, { :null => false, :default => 1 } end def self.down remove_column :bugs, :prio...