Sha256: e462ebd394171076d4f6b6985ef5fb42a2c539d977cdd21689e018af5c81e2b8
Contents?: true
Size: 564 Bytes
Versions: 5
Compression:
Stored size: 564 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]) if @review && @feedback_review = @review.feedback_reviews.new(params[:feedback_review]) authorize! :create, @feedback_review @feedback_review.save end respond_to do |format| format.html { redirect_to :back } format.js { render :action => :create } end end end
Version data entries
5 entries across 5 versions & 1 rubygems