Sha256: 7d32b8bed5c6b3ccec08d8b263da1eee7a31b87d24df9853c4c6712b6910a928
Contents?: true
Size: 563 Bytes
Versions: 1
Compression:
Stored size: 563 Bytes
Contents
class Spree::AuthenticationMethod < ActiveRecord::Base attr_accessible :provider, :api_key, :api_secret, :environment, :active def self.active_authentication_methods? found = false where(:environment => ::Rails.env).each do |method| if method.active found = true end end return found end scope :available_for, lambda { |user| sc = where(:environment => ::Rails.env) sc = sc.where(["provider NOT IN (?)", user.user_authentications.map(&:provider)]) if user and !user.user_authentications.empty? sc } end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
spree_social_onr-2.1.4 | app/models/spree/authentication_method.rb |