Module: CanTango::Rails::Helpers::BaseHelper::ClassMethods
- Included in:
- CanTango::Rails::Helpers::BaseHelper
- Defined in:
- lib/cantango/rails/helpers/base_helper.rb
Instance Method Summary collapse
Instance Method Details
#apis ⇒ Object
20 21 22 |
# File 'lib/cantango/rails/helpers/base_helper.rb', line 20 def apis [:Can, :Scope] end |
#include_apis(clazz) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/cantango/rails/helpers/base_helper.rb', line 12 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 |