Class: Admin::CategoriesController
- Inherits:
-
BaseController
- Object
- BaseController
- Admin::CategoriesController
- Defined in:
- app/controllers/admin/categories_controller.rb
Instance Method Summary collapse
Instance Method Details
#validate_children ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'app/controllers/admin/categories_controller.rb', line 11 def validate_children if Category.last.parent.present? if Category.last.parent.products.present? flash.now[:notice] = "Please be aware that the '#{Category.last.parent.name}' category has products attached to it. Please re-assign these." end end end |