Methods
Included Modules
Attributes
[R] menus
[R] name
[R] url
Public Instance methods
allowed()

Return allowed controllers

     # File lib/access_control/base.rb, line 158
158:       def allowed
159:         @menus.each { |m| @allowed.concat(m.allowed) }
160:         @allowed.uniq
161:       end
config()

Return ExtJs Config for this project module

     # File lib/access_control/base.rb, line 174
174:       def config
175:         options = @options.merge(:text => human_name)
176:         options.merge!(:menu => @menus.collect(&:config)) if @menus.size > 0
177:         options.merge!(:handler =>  "function(){ Backend.app.load('#{url_for(@url.merge(:only_path => true))}') }".to_l) if @url
178:         options
179:       end
human_name()

Return the original name or try to translate or humanize the symbol

     # File lib/access_control/base.rb, line 164
164:       def human_name
165:         @name.is_a?(Symbol) ? I18n.t("backend.menus.#{@name}", :default => @name.to_s.humanize) : @name
166:       end
menu(name, path=nil, options={}, &block)

Build a new menu and automaitcally add the action on the allowed actions.

     # File lib/access_control/base.rb, line 153
153:       def menu(name, path=nil, options={}, &block)
154:         @menus << Menu.new(name, path, options, &block)
155:       end
uid()

Return a unique id for the given project module

     # File lib/access_control/base.rb, line 169
169:       def uid
170:         @name.to_s.downcase.gsub(/[^a-z0-9]+/, '').gsub(/-+$/, '').gsub(/^-+$/, '')
171:       end