Sha256: 872ab86b375fee9a099f0bc43f616ed21c025383a752b8b038a896fa4669f3ae
Contents?: true
Size: 789 Bytes
Versions: 4
Compression:
Stored size: 789 Bytes
Contents
require 'rails/generators' require 'rails/generators/migration' class ConversationsGenerator < Rails::Generators::Base include Rails::Generators::Migration def self.source_root @source_root ||= File.join(File.dirname(__FILE__), 'templates') end def self.next_migration_number(dirname) next_migration_number = current_migration_number(dirname) + 1 ActiveRecord::Migration.next_migration_number(next_migration_number) end def create_migration_file migration_template '20120105153739_create_conversations.rb', 'db/migrate/create_conversations.rb' migration_template '20120105153800_create_user_conversations.rb', 'db/migrate/create_user_conversations.rb' migration_template '20120105153812_create_messages.rb', 'db/migrate/create_messages.rb' end end
Version data entries
4 entries across 4 versions & 1 rubygems