Sha256: dd597ec2d39e9c441fd693784e0a9fc1103b04b750abbfdafd11babc6b845682
Contents?: true
Size: 576 Bytes
Versions: 10
Compression:
Stored size: 576 Bytes
Contents
module ControllerHacks extend ActiveSupport::Concern included do routes { Spree::Core::Engine.routes } end def api_get(action, params={}, session=nil, flash=nil) api_process(action, params, session, flash, "GET") end def api_process(action, params={}, session=nil, flash=nil, method="get") scoping = respond_to?(:resource_scoping) ? resource_scoping : {} process(action, method, params.merge(scoping).reverse_merge!(:format => :json), session, flash) end end RSpec.configure do |config| config.include ControllerHacks, type: :controller end
Version data entries
10 entries across 10 versions & 1 rubygems