Sha256: 2deeb7de235d7d287e333aab417acdf31008cd6c7d7cb607ea001700cd05bc05

Contents?: true

Size: 514 Bytes

Versions: 3

Compression:

Stored size: 514 Bytes

Contents

class FeedbackReviewsController < Spree::BaseController
  helper Spree::BaseHelper
  def create
    params[:feedback_review][:rating].sub!(/\s*stars/,'') unless params[:feedback_review][:rating].blank?

    @review = Review.find_by_id(params[:review_id])
    @review &&
      (@feedback_review = @review.feedback_reviews.new(params[:feedback_review])) && @feedback_review.save

    respond_to do |format|
      format.html { redirect_to :back  }
      format.js   { render :action => :create }
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
spree_reviews-0.50.1 app/controllers/feedback_reviews_controller.rb
spree_reviews-0.50.0 app/controllers/feedback_reviews_controller.rb
spree_reviews-0.30.0 app/controllers/feedback_reviews_controller.rb