Class: Workarea::Storefront::ReviewsController

Inherits:
Storefront::ApplicationController
  • Object
show all
Defined in:
app/controllers/workarea/storefront/reviews_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



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

#newObject



7
# File 'app/controllers/workarea/storefront/reviews_controller.rb', line 7

def new; end