Need some help on Rails


#1

https://www.codecademy.com/courses/learn-rails/lessons/one-many/exercises/one-many-models-ii?action=lesson_resume

Why is it not working, first question?

class CreateTags < ActiveRecord::Migration
  def change
    create_table :tags do |t|
    end
    def change
      create_table line: t.string:title
      t.string:image
      t.timestamps
    end
  end
end

#2

Hi @peteislearning86,

There should only be one def change ... end part in your code, and the create_table line: part shouldn’t be in there. After that, make sure that your code has proper whitespace - newlines and spaces where appropriate.

Please post your updated code if you’re still having trouble!


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.