DB変更。Amazonへのリンクと、自分のブログの感想のエントリの為のURLを持たせることにする。
class AddBlogToBook < ActiveRecord::Migration @cls = [ [:amazon_url, :string], [:blog_url, :string] ] def self.up @cls.each{|c| add_column :books, *c} end def self.down @cls.each{|c| remove_column :books, *c} end end