Important tasks for setting up or configuring the admin application.
Add access_control permission in our app.rb
# File lib/padrino-admin/generators/actions.rb, line 43 def add_project_module(controller) permission = " role.project_module :#{controller}, \"/#{controller}\"\n" inject_into_file destination_root("/admin/app.rb"), permission, :after => "access_control.roles_for :admin do |role|\n" end
Tell us which rendering engine you are using
# File lib/padrino-admin/generators/actions.rb, line 22 def ext fetch_component_choice(:admin_renderer).to_sym rescue :haml end
Tell us which orm we are using
# File lib/padrino-admin/generators/actions.rb, line 14 def orm fetch_component_choice(:orm).to_sym rescue :activerecord end
Remove from access_control permissions
# File lib/padrino-admin/generators/actions.rb, line 51 def remove_project_module(controller) path = destination_root("/admin/app.rb") say_status :replace, "admin/app.rb", :red content = File.binread(path) content.gsub!(/^\s+role\.project_module :#{controller}, "\/#{controller}"\n/, '') File.open(path, 'wb') { |f| f.write content } end
Generated with the Darkfish Rdoc Generator 2.