Sha256: 44049a26b488e0f51b0662de691be9199ca9468302dc7fd6583aba8568b8e2ae

Contents?: true

Size: 810 Bytes

Versions: 30

Compression:

Stored size: 810 Bytes

Contents

require 'rails/generators'
require File.expand_path('../utils', __FILE__)

module RailsAdmin
  class UninstallGenerator < Rails::Generators::Base
    include Rails::Generators::Migration
    include Generators::Utils::InstanceMethods
    extend Generators::Utils::ClassMethods
    source_root File.expand_path('../templates', __FILE__)

    desc "RailsAdmin uninstall"

    def uninstall
      display "Why you leaving so soon? :("
      migration_template 'drop.rb', 'db/migrate/drop_rails_admin_histories_table.rb'
      remove_file 'config/initializers/rails_admin.rb'
      remove_file 'config/initializers/rails_admin.rb.example'
      gsub_file "config/routes.rb", /mount RailsAdmin::Engine => \'\/.+\', :as => \'rails_admin\'/, ''
      display "Done! Devise has been left untouched."
    end
  end
end

Version data entries

30 entries across 30 versions & 5 rubygems

Version Path
rails_admin-0.6.0 lib/generators/rails_admin/uninstall_generator.rb
rails_admin-0.5.0 lib/generators/rails_admin/uninstall_generator.rb
rails_admin-0.4.9 lib/generators/rails_admin/uninstall_generator.rb
rails_admin-0.4.8 lib/generators/rails_admin/uninstall_generator.rb
rails_admin-0.4.7 lib/generators/rails_admin/uninstall_generator.rb
rails_admin-0.4.6 lib/generators/rails_admin/uninstall_generator.rb
rails_admin-0.4.5 lib/generators/rails_admin/uninstall_generator.rb
rails_admin-0.4.4 lib/generators/rails_admin/uninstall_generator.rb
rails_admin-lbgraham-0.4.2 lib/generators/rails_admin/uninstall_generator.rb
rails_admin-0.4.3 lib/generators/rails_admin/uninstall_generator.rb
rails_admin-0.4.2 lib/generators/rails_admin/uninstall_generator.rb
rails_admin-0.4.1 lib/generators/rails_admin/uninstall_generator.rb
rails_admin-0.4.0 lib/generators/rails_admin/uninstall_generator.rb
rails_admin-0.3.0 lib/generators/rails_admin/uninstall_generator.rb
rails_admin-0.2.0 lib/generators/rails_admin/uninstall_generator.rb
rails_admin-0.1.2 lib/generators/rails_admin/uninstall_generator.rb
rails_admin-0.1.1 lib/generators/rails_admin/uninstall_generator.rb
rails_admin-0.1.0 lib/generators/rails_admin/uninstall_generator.rb
rails_admin-0.0.5 lib/generators/rails_admin/uninstall_generator.rb
rails_admin-0.0.4 lib/generators/rails_admin/uninstall_generator.rb