Sha256: 34a48abdf4a27a6b293b6dbf059d728c21a3e2c90dc319722d1c54a57a866be8

Contents?: true

Size: 521 Bytes

Versions: 9

Compression:

Stored size: 521 Bytes

Contents

require 'rails/generators'

module Pages
  module Generators
    class UpminGenerator < ::Rails::Generators::Base
      source_root File.expand_path("../templates", __FILE__)

      desc "Add Upmin for an admin interface. Requires Devise and role-based authentication."

      def add_upmin
        copy_file 'upmin.rb', 'config/initializers/upmin.rb'
        route = "  mount Upmin::Engine => '/admin'"
        inject_into_file 'config/routes.rb', route + "\n", :after => "routes.draw do\n"
      end

    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rails_apps_pages-0.6.7 lib/generators/pages/upmin/upmin_generator.rb
rails_apps_pages-0.6.6 lib/generators/pages/upmin/upmin_generator.rb
rails_apps_pages-0.6.5 lib/generators/pages/upmin/upmin_generator.rb
rails_apps_pages-0.6.4 lib/generators/pages/upmin/upmin_generator.rb
rails_apps_pages-0.6.3 lib/generators/pages/upmin/upmin_generator.rb
rails_apps_pages-0.6.2 lib/generators/pages/upmin/upmin_generator.rb
rails_apps_pages-0.6.0 lib/generators/pages/upmin/upmin_generator.rb
rails_apps_pages-0.5.16 lib/generators/pages/upmin/upmin_generator.rb
rails_apps_pages-0.5.15 lib/generators/pages/upmin/upmin_generator.rb