app/controllers/kadmin/application_controller.rb in kadmin-0.4.0 vs app/controllers/kadmin/application_controller.rb in kadmin-0.4.1
- old
+ new
@@ -13,18 +13,10 @@
before_action :set_default_format
# Each controller should specify which navbar section they
# belong to, if any. By default, each controller is setup to
# be its own section.
- class << self
- def navbar_section=(id)
- @navbar_section = id.to_s.freeze
- end
-
- def navbar_section
- return @navbar_section ||= self
- end
- end
+ class_attribute :navbar_section
# @!group Error Handling
if Kadmin.config.handle_errors && !defined?(BetterErrors)
rescue_from StandardError, with: :handle_unexpected_error