Sha256: c01b7e8acc9e0afa36a36c32a8ee171f2d184f3938b4a1c14ec6fbc2477497ea
Contents?: true
Size: 295 Bytes
Versions: 34
Compression:
Stored size: 295 Bytes
Contents
class MessageHasManyGroups < ActiveRecord::Migration def self.up Message.all.each do |m| if g = Group.find_by_id(m.group_id) m.permit(g) end end remove_column :messages, :group_id end def self.down add_column :messages, :group_id , :integer end end
Version data entries
34 entries across 34 versions & 1 rubygems