parent
ef5b7c9fca
commit
bcc8abdee9
@ -0,0 +1,5 @@
|
|||||||
|
class Organization < ActiveRecord::Base
|
||||||
|
attr_accessible :logo_link, :name
|
||||||
|
|
||||||
|
has_many :projects
|
||||||
|
end
|
@ -0,0 +1,10 @@
|
|||||||
|
class CreateOrganizations < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
create_table :organizations do |t|
|
||||||
|
t.string :name
|
||||||
|
t.string :logo_link
|
||||||
|
|
||||||
|
t.timestamps
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,9 @@
|
|||||||
|
class AddOrganizationToProject < ActiveRecord::Migration
|
||||||
|
def up
|
||||||
|
add_column :projects, :organization_id, :integer
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
remove_column :projects, :organization_id
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,5 @@
|
|||||||
|
require 'spec_helper'
|
||||||
|
|
||||||
|
describe Organization do
|
||||||
|
pending "add some examples to (or delete) #{__FILE__}"
|
||||||
|
end
|
Loading…
Reference in new issue