Class: Adminsite::Generators::AddDashboardGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/adminsite/add_dashboard/add_dashboard_generator.rb

Instance Method Summary collapse

Instance Method Details

#run_generationObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/generators/adminsite/add_dashboard/add_dashboard_generator.rb', line 7

def run_generation


  @title = "Override Me !!!"


   #puts "my first iframe for controller_name'#{@controller_name}' }'"
   template  "controllers/admin_dashboard_controller.rb", "app/controllers/adminsite/admin/dashbord_controller.rb"

   template  "views/index.html.haml", "app/views/adminsite/admin/dashboard/index.html.haml"

   template  "views/index.html.haml", "app/views/adminsite/admin/dashboard/index.html.haml"

   # Content-Menu
   inject_into_file "app/views/adminsite/admin/shared/_admin_menu.html.haml", :after => /\= yield :admin_menu\n/ do\
   # "\n    = menu_item 'IFrameMgt', admin_#Dashboard_index_path, ['#{@file_name}']\n"
    "\n    = menu_item 'Dashboard', admin_dashboard_index_path "
   end




end