Class: Workarea::Storefront::ReviewsController
- Inherits:
-
Storefront::ApplicationController
- Object
- Storefront::ApplicationController
- Workarea::Storefront::ReviewsController
- Defined in:
- app/controllers/workarea/storefront/reviews_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'app/controllers/workarea/storefront/reviews_controller.rb', line 9 def create if review_can_be_saved? && @create_review.save redirect_to product_path(params[:product_id]) flash[:success] = t('workarea.storefront.reviews.flash_messages.created') else render :new flash[:error] = t('workarea.storefront.reviews.flash_messages.failure') end end |
#new ⇒ Object
7 |
# File 'app/controllers/workarea/storefront/reviews_controller.rb', line 7 def new; end |