Sha256: 7117c5bf5914bf122381962c6fd811d6bac2359f0685a126482ed7ee827e5e74
Contents?: true
Size: 513 Bytes
Versions: 1
Compression:
Stored size: 513 Bytes
Contents
module IamHelper ROLE_CLASS = Iam::Configuration.role_class.constantize ACCOUNT_CLASS = Iam::Configuration.account_class.constantize def iam @account_samples = account_samples render 'iam/menu' end private def account_samples ROLE_CLASS.all.inject({}) do |account_groups, role| account_group = ACCOUNT_CLASS.where(ROLE_CLASS.to_s.foreign_key => role.id).order(:id).limit(Iam::Configuration.accounts_for_each_role) account_groups.merge role => account_group end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
iam-0.0.9 | app/helpers/iam_helper.rb |