Sha256: 454b45ee28fa5cbe8e86b8556455a0a8a566e29f08c83616b9eefd5e0e56fb4c
Contents?: true
Size: 716 Bytes
Versions: 12
Compression:
Stored size: 716 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
12 entries across 12 versions & 1 rubygems