Sha256: ab3a405df529508b76d13f32856bc1db66ef7f0ed8a8eb1d145343714dd1ee9a

Contents?: true

Size: 579 Bytes

Versions: 3

Compression:

Stored size: 579 Bytes

Contents

require 'rails/generators/active_record'
require 'generators/devise/orm_helpers'

module ActiveRecord
  module Generators
    class DeviseGuestsGenerator < ActiveRecord::Generators::Base
      include Devise::Generators::OrmHelpers
      source_root File.expand_path("../templates", __FILE__)

      def copy_devise_migration
          migration_template "migration_existing.rb", "db/migrate/add_devise_guests_to_#{table_name}"
      end

      def migration_data
<<RUBY
      ## Database authenticatable
      t.boolean :guest, :default => false
RUBY
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
devise-guests-0.3.2 lib/generators/active_record/devise_guests_generator.rb
devise-guests-0.3.1 lib/generators/active_record/devise_guests_generator.rb
devise-guests-0.3.0 lib/generators/active_record/devise_guests_generator.rb