Class: FeedbackReviewsController
- Inherits:
-
Spree::BaseController
- Object
- Spree::BaseController
- FeedbackReviewsController
- Defined in:
- app/controllers/feedback_reviews_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'app/controllers/feedback_reviews_controller.rb', line 3 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 |