parent
84ae8a1cde
commit
9fb9d2dbdf
@ -0,0 +1,16 @@
|
||||
|
||||
class ProjectingSoftapplication < ActiveRecord::Base
|
||||
attr_accessible :project_id, :softapplication_id, :user_id
|
||||
|
||||
belongs_to :project
|
||||
belongs_to :softapplication
|
||||
belongs_to :user
|
||||
|
||||
|
||||
def self.create_softapplication_projecting(project_id, softapplication_id)
|
||||
self.create(:user_id => User.current.id, :project_id => project_id,
|
||||
:softapplication_id => softapplication_id)
|
||||
end
|
||||
|
||||
|
||||
end
|
@ -0,0 +1,5 @@
|
||||
class AddUserIdToProjects < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :projects, :user_id, :integer
|
||||
end
|
||||
end
|
@ -0,0 +1,14 @@
|
||||
class CreateProjectingSoftapplictions < ActiveRecord::Migration
|
||||
def up
|
||||
create_table :projecting_softapplictions do |t|
|
||||
t.integer :user_id
|
||||
t.integer :softapplication_id
|
||||
t.integer :project_id
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
def down
|
||||
drop_table :projecting_softapplictions
|
||||
end
|
||||
end
|
||||
end
|
@ -0,0 +1,5 @@
|
||||
class AddDepositProjectToSoftapplications < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :softapplications, :deposit_project, :string
|
||||
end
|
||||
end
|
Loading…
Reference in new issue