Sha256: 69b1c206e5fd556453016f3e14633deaf698b775f5bb1ad9560bd6444dd1883c
Contents?: true
Size: 750 Bytes
Versions: 1
Compression:
Stored size: 750 Bytes
Contents
require "generators/active_record_survey/active_record_survey_generator" require "generators/active_record_survey/next_migration_version" require "rails/generators/migration" require "rails/generators/active_record" # Extend the HasDynamicColumnsGenerator so that it creates an AR migration module HasDynamicColumns class ActiveRecordGenerator < ::HasDynamicColumnsGenerator include Rails::Generators::Migration extend NextMigrationVersion source_paths << File.join(File.dirname(__FILE__), "templates") def create_migration_file migration_template "migration.rb", "db/migrate/add_active_record_survey.rb" end def self.next_migration_number(dirname) ::ActiveRecord::Generators::Base.next_migration_number dirname end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
active_record_survey-0.1.10 | lib/generators/active_record_survey/active_record_generator.rb |