You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry the read me had a bug in it. In your migration (note the change of t.attached to t.attachment) do:
class CreateVideos < ActiveRecord::Migration
def self.up
create_table :videos do |t|
t.string :title
t.text :description
t.attachment :video_hd
t.timestamps
end
end
def self.down
drop_table :videos
end
end
Hello, I have this error when migrating on rails 3.1.1
Run:
rake db:migrate
undefined method `attached' for #ActiveRecord::ConnectionAdapters::TableDefinition:0xb6c97cf8
My code is:
class CreateVideos < ActiveRecord::Migration
def self.up
create_table :videos do |t|
t.string :title
t.text :description
t.attached :video_hd
end
def self.down
drop_table :videos
end
end
The text was updated successfully, but these errors were encountered: