Sha256: 26c1d11cb9507cc7cca4171cf3ff3027325d8369a33af1c78577cb801ece7eae
Contents?: true
Size: 714 Bytes
Versions: 6
Compression:
Stored size: 714 Bytes
Contents
module CanTango module Rails module Helpers module BaseHelper def self.included(base) include_apis(base) base.send :include, CanTango::Rails::Helpers::RestHelper base.extend ClassMethods end module ClassMethods def include_apis(clazz) return if !respond_to?(:apis) || !apis apis.each do |api| clazz.send :include, "CanTango::Api::User::#{api}".constantize clazz.send :include, "CanTango::Api::UserAccount::#{api}".constantize end end def apis [:Can, :Scope] end end extend ClassMethods end end end end
Version data entries
6 entries across 6 versions & 1 rubygems