Sha256: 86eae6ae3fc71a2a579b1e76339038eada00e21e9040705ee9c831e8804a43f2
Contents?: true
Size: 815 Bytes
Versions: 11
Compression:
Stored size: 815 Bytes
Contents
module PaymentTest class EngineController < ApplicationController layout :get_layout def get_layout layout ||= PaymentTest.config[:layout] end def current_tenant_user # If the rails application on which that engine is mounted defines such method (Devise), we extract the current user, # if not we default to nil, and serve our static mock configuration user = current_user if respond_to?(:current_user) PaymentTest.current_tenant_user.call(session, user) end def options_for_klient user = current_tenant_user { :username => user[:username], :password => user[:password], :session_id => user[:session_id], :api_key => user[:api_key], :api_secret => user[:api_secret] } end end end
Version data entries
11 entries across 11 versions & 2 rubygems