changeset 56:1d072f771b4d luisf

changes to add SSAMR info. This is a development Commit - DO NOT USE this version.
author luisf
date Fri, 26 Nov 2010 15:46:21 +0000
parents bbb139d5ca95
children 215c92fd5954
files app/models/ssamr_user_details.rb db/migrate/20101123161346_add_ssamr_descriptions_to_users.rb db/migrate/20101123161346_create_ssamr_user_details.rb test/fixtures/ssamr_user_details.yml test/unit/ssamr_user_details_test.rb
diffstat 5 files changed, 32 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/models/ssamr_user_details.rb	Fri Nov 26 15:46:21 2010 +0000
@@ -0,0 +1,3 @@
+class SsamrUserDetail < ActiveRecord::Base
+  belongs_to :user  
+end
--- a/db/migrate/20101123161346_add_ssamr_descriptions_to_users.rb	Fri Nov 26 15:44:34 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-class AddSsamrDescriptionsToUsers < ActiveRecord::Migration
-  def self.up
-    add_column :users, :ssamr_descriptions, :text
-  end
-
-  def self.down
-    remove_column :users, :ssamr_descriptions
-  end
-end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/db/migrate/20101123161346_create_ssamr_user_details.rb	Fri Nov 26 15:46:21 2010 +0000
@@ -0,0 +1,14 @@
+class CreateSsamrUserDetails < ActiveRecord::Migration
+  def self.up
+    create_table :ssamr_user_details do |t|
+      t.integer :user_id
+      t.text :description 
+      t.text :university
+    end
+  end
+
+  def self.down
+    drop_table :ssamr_user_details
+  end
+  
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/fixtures/ssamr_user_details.yml	Fri Nov 26 15:46:21 2010 +0000
@@ -0,0 +1,7 @@
+# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
+
+# one:
+#   column: value
+#
+# two:
+#   column: value
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/unit/ssamr_user_details_test.rb	Fri Nov 26 15:46:21 2010 +0000
@@ -0,0 +1,8 @@
+require 'test_helper'
+
+class SsamrUserDetailsTest < ActiveSupport::TestCase
+  # Replace this with your real tests.
+  test "User Id should be correct" do
+    assert_equal user_id, user.id 
+  end
+end