Browse files

Add suggester to suggestions model

  • Loading branch information...
1 parent b7d89a4 commit 1e8fddc607f492e8d8081b45cc87738774f693b3 @thagomizer thagomizer committed Apr 9, 2013
Showing with 8 additions and 2 deletions.
  1. +5 −0 db/migrate/20130408194405_add_suggester_to_suggestions.rb
  2. +2 −1 db/schema.rb
  3. +1 −1 test/models/suggestion_test.rb
View
5 db/migrate/20130408194405_add_suggester_to_suggestions.rb
@@ -0,0 +1,5 @@
+class AddSuggesterToSuggestions < ActiveRecord::Migration
+ def change
+ add_column :suggestions, :suggester, :string
+ end
+end
View
3 db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20130124033130) do
+ActiveRecord::Schema.define(:version => 20130408194405) do
create_table "affiliations", :force => true do |t|
t.integer "dude_id"
@@ -59,6 +59,7 @@
t.string "title"
t.datetime "created_at"
t.datetime "updated_at"
+ t.string "suggester"
end
create_table "talks", :force => true do |t|
View
2 test/models/suggestion_test.rb
@@ -2,7 +2,7 @@
class SuggestionTest < MiniTest::Rails::ActiveSupport::TestCase
def test_valid
- suggestion = Suggestion.new(:title => "WOOT")
+ suggestion = Suggestion.new(:title => "WOOT", :suggester => "Fred")
assert suggestion.valid?
end

0 comments on commit 1e8fddc

Please sign in to comment.