Class: RubyUIAdmin::HomeController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- RubyUIAdmin::HomeController
- Defined in:
- app/controllers/ruby_ui_admin/home_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'app/controllers/ruby_ui_admin/home_controller.rb', line 5 def index resources = RubyUIAdmin.resource_manager. # Redirect to the first resource's index, or the configured home path. if (home = RubyUIAdmin.configuration.home_path) redirect_to home elsif resources.any? redirect_to helpers.public_send("resources_#{resources.first.route_key}_path") else render Views::Home.new(resources: resources) end end |