diff --git a/db/migrate/20150720182518_create_feeds.rb b/db/migrate/20150720182518_create_feeds.rb index a17aaef..3bb1bbc 100644 --- a/db/migrate/20150720182518_create_feeds.rb +++ b/db/migrate/20150720182518_create_feeds.rb @@ -2,6 +2,7 @@ class CreateFeeds < ActiveRecord::Migration def change create_table :feeds do |t| t.string :feed_url + t.string :url t.timestamps end end diff --git a/db/migrate/20150720182645_create_subscriptions.rb b/db/migrate/20150720182645_create_subscriptions.rb index c376758..fae391b 100644 --- a/db/migrate/20150720182645_create_subscriptions.rb +++ b/db/migrate/20150720182645_create_subscriptions.rb @@ -2,8 +2,7 @@ class CreateSubscriptions < ActiveRecord::Migration def change create_table :subscriptions do |t| t.references :feed - t.references :Section - t.string :url + t.references :section t.string :name t.timestamps end diff --git a/db/seeds.rb b/db/seeds.rb index bcda310..acc0c60 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -9,11 +9,5 @@ default_section = Section.create!(title: 'Default') File.foreach('db/defaultfeeds.txt').each_slice(3) do |feed| - p '-'*50 - print "\n\n\n\n\n" - p feed[0].chomp - p feed[1].chomp - print "\n\n\n\n\n" - p '-'*50 - default_section.subscriptions.create(name: feed[0].chomp, set_feed: feed[1].chomp) + default_section.subscriptions.create(name: feed[0].chomp,) end