Sha256: 1387a00a6d3cdf936770e38469aee81018c3411061f3a657530b58a5e0bf573b
Contents?: true
Size: 567 Bytes
Versions: 34
Compression:
Stored size: 567 Bytes
Contents
module Sinatra::FanforceHelpers require 'fanforce/api' def fanforce_id @fanforce_id = params[:fanforce_id] || ff.params[:fanforce_id] end def ff return @ff if @ff.present? @ff = Fanforce::API.new(params) #return @ff if !@ff.valid_fanforce_request? and !@ff.valid_fanforce_js_request? @ff.auth Sinatra::FanforceHelpers.find_api_key(ff.params[:fanforce_id]) @ff end def self.find_api_key(fanforce_id, addon_type=:plugin, addon_id=FanforcePlugin._id) $Redis.get("installed:#{addon_type}-#{addon_id}:#{fanforce_id}") end end
Version data entries
34 entries across 34 versions & 1 rubygems