Sha256: 33e919298504dd7da7d8efb06acfa2518e9978e204da761efd7989878a82122c
Contents?: true
Size: 1.3 KB
Versions: 4
Compression:
Stored size: 1.3 KB
Contents
require 'rails/generators' require 'tramway/core/generators/install_generator' module Tramway::Event::Generators class InstallGenerator < ::Tramway::Core::Generators::InstallGenerator include Rails::Generators::Migration source_root File.expand_path('../templates', __FILE__) def run_other_generators end def self.next_migration_number(path) next_migration_number = current_migration_number(path) + 1 ActiveRecord::Migration.next_migration_number next_migration_number end def copy_migrations migration_template 'create_tramway_event_events.rb', 'db/migrate/create_tramway_event_events.rb' migration_template 'add_photo_to_tramway_event_events.rb', 'db/migrate/add_photo_to_tramway_event_events.rb' migration_template 'create_tramway_event_participant_form_fields.rb', 'db/migrate/create_tramway_event_participant_form_fields.rb' migration_template 'create_tramway_event_participants.rb', 'db/migrate/create_tramway_event_participants.rb' migration_template 'add_options_to_tramway_event_participant_form_fields.rb', 'db/migrate/add_options_to_tramway_event_participant_form_fields.rb' migration_template 'add_position_to_tramway_event_participant_form_fields.rb', 'db/migrate/add_position_to_tramway_event_participant_form_fields.rb' end end end
Version data entries
4 entries across 4 versions & 1 rubygems