Sha256: 933f29eef59b76bc1ef06db07d495e552e7faff035769b1a324a811f32fa5afb
Contents?: true
Size: 497 Bytes
Versions: 2
Compression:
Stored size: 497 Bytes
Contents
module Vhost::AdminUsersHelperExtensions def self.included(receiver) receiver.send :alias_method_chain, :roles, :site_admin receiver.send :define_method, :sites do |user| sites = user.sites.collect{|site| site.title} sites.join("<br/>") end end def roles_with_site_admin(user) roles = [] roles << 'Admin' if user.admin? roles << 'Site Admin' if user.site_admin? roles << 'Designer' if user.designer? roles.join(', ') end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
radiant-vhost-extension-2.3.1 | lib/vhost/admin_users_helper_extensions.rb |
radiant-vhost-extension-2.3.0 | lib/vhost/admin_users_helper_extensions.rb |