Sha256: 3909bdf928ef54f2987acb41f55ef919f413869f82d1301b040a05f6592bb7a8
Contents?: true
Size: 829 Bytes
Versions: 3
Compression:
Stored size: 829 Bytes
Contents
say "Building admin" generate(:controller, "admin/dashboard index") inject_into_file 'config/routes.rb', :after => "devise_for :users\n" do <<-RUBY match 'admin' => 'admin/dashboard#index' RUBY end # Do layout and SASS stuff apply File.expand_path("../admin/sass.rb", __FILE__) apply File.expand_path("../admin/layout.rb", __FILE__) create_file 'app/controllers/admin/base_controller.rb' do <<-RUBY class Admin::BaseController < ApplicationController layout 'admin' before_filter :authenticate_user! end RUBY end gsub_file 'app/controllers/admin/dashboard_controller.rb', /ApplicationController/, 'Admin::BaseController' # make a user admin apply File.expand_path("../admin/users.rb", __FILE__) apply File.expand_path("../admin/dashboard_spec.rb", __FILE__) apply File.expand_path("../admin/users_spec.rb", __FILE__)
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
prologue-0.1.2 | templates/admin.rb |
prologue-0.1.1 | templates/admin.rb |
prologue-0.1.0 | templates/admin.rb |