skip to Main Content

Memcached – ruby on rails api, how to authenticate user?

some controller: class Api::V1::AbilitiesController < API::V1::BaseController before_action :authenticate_api_v1_user! def index @resources = User.first.roles.map{|role| role.grants}.flatten! render json: @resources.group_by{|x| x.action} end end gemfile: source 'https://rubygems.org' ## Rails - Lock project at 4.2.x gem 'rails', '4.2.6' ## Database and ActiveRecord related gem 'pg'…

VIEW QUESTION

Block discount on certain product shopify script

I want to write a script in Shopify that prevents discounts from rendering on certain products. I know this is wrong, but something like this: Input.cart.line_items.each do |line_item| product = line_item.variant.product if product = 123456789 CartDiscount.remove("Discount does not apply") end…

VIEW QUESTION
Back To Top
Search