Class: Caboose::ReviewsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Caboose::ReviewsController
- Defined in:
- app/controllers/caboose/reviews_controller.rb
Instance Method Summary collapse
Methods inherited from ApplicationController
#admin_add, #admin_bulk_add, #admin_bulk_delete, #admin_bulk_update, #admin_delete, #admin_edit, #admin_index, #admin_json, #admin_json_single, #admin_update, #before_action, #before_before_action, #hashify_query_string, #init_cart, #logged_in?, #logged_in_user, #login_user, #logout_user, #parse_url_params, #reject_param, #user_is_allowed, #user_is_allowed_to, #validate_cookie, #validate_token, #var, #verify_logged_in
Instance Method Details
#add ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'app/controllers/caboose/reviews_controller.rb', line 4 def add content = params[:content] product_id = params[:product_id] = params[:rating] name = params[:name] r = Review.new(:content => content, :product_id => product_id, :rating => , :name => name) r.save render :json => true end |