Sha256: 9eb4c3c3c8c64f0eea34861b4a7f1f8761c3f11942250fdd0af8b6300470364e

Contents?: true

Size: 803 Bytes

Versions: 7

Compression:

Stored size: 803 Bytes

Contents

say "Building admin"
generate(:controller, "admin/dashboard index")
route("match 'admin' => 'admin/dashboard#index'")

# 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__)
apply File.expand_path("../admin/cucumber.rb", __FILE__)

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
prologue-0.3.11 templates/admin.rb
mologue-0.0.1 templates/admin.rb
prologue-0.3.10 templates/admin.rb
prologue-0.3.9 templates/admin.rb
prologue-0.3.7 templates/admin.rb
prologue-0.3.6 templates/admin.rb
prologue-0.3.0 templates/admin.rb