Class: Admin::ReviewsController
- Inherits:
-
BaseController
- Object
- BaseController
- Admin::ReviewsController
- Defined in:
- app/controllers/admin/reviews_controller.rb
Instance Method Summary collapse
Instance Method Details
#approve ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 |
# File 'app/controllers/admin/reviews_controller.rb', line 17 def approve r = Review.find(params[:id]) if r.update_attribute(:approved, true) r.product. flash[:notice] = t("info_approve_review") else flash[:error] = t("error_approve_review") end redirect_to admin_reviews_path end |