require 'rails/generators'
require 'rails/generators/migration'
require 'rails/generators/active_record'

module NetsuiteRails
  module Generators
    class InstallGenerator < Rails::Generators::Base
      # http://stackoverflow.com/questions/4141739/generators-and-migrations-in-plugins-rails-3

      if Rails::VERSION::STRING.start_with?('3.2')
        include Rails::Generators::Migration
        extend ActiveRecord::Generators::Migration
      else
        include ActiveRecord::Generators::Migration
      end

      source_root File.expand_path('../templates', __FILE__)

      def copy_migration
        migration_template "create_netsuite_poll_timestamps.rb", "db/migrate/create_netsuite_poll_timestamps.rb"
      end

    end
  end
end

require 'rails/generators'
require 'rails/generators/migration'
require 'rails/generators/active_record'

module NetsuiteRails
  module Generators
    class InstallGenerator < Rails::Generators::Base
      # http://stackoverflow.com/questions/4141739/generators-and-migrations-in-plugins-rails-3
      include ActiveRecord::Generators::Migration

      source_root File.expand_path('../templates', __FILE__)

      def copy_migration
        migration_template "create_netsuite_poll_timestamps.rb", "db/migrate/create_netsuite_poll_timestamps.rb"
      end

    end
  end
end

--- 
+++ 
@@ -6,7 +6,13 @@
   module Generators
     class InstallGenerator < Rails::Generators::Base
       # http://stackoverflow.com/questions/4141739/generators-and-migrations-in-plugins-rails-3
-      include ActiveRecord::Generators::Migration
+
+      if Rails::VERSION::STRING.start_with?('3.2')
+        include Rails::Generators::Migration
+        extend ActiveRecord::Generators::Migration
+      else
+        include ActiveRecord::Generators::Migration
+      end
 
       source_root File.expand_path('../templates', __FILE__)
 
Support rails 3.2 in install generator
