Object
Project Module class
Returns the name of the project module. If a symbol it translate/humanize them for you.
# File lib/padrino-admin/access_control.rb, line 167 def human_name @name.is_a?(Symbol) ? I18n.t("padrino.admin.menu.#{@name}", :default => @name.to_s.humanize) : @name end
Return the path of the project module. If a prefix given will be prepended.
@example
# => /accounts/new project_module.path # => /admin/accounts project_module.path("/admin")
# File lib/padrino-admin/access_control.rb, line 180 def path(prefix=nil) path = prefix ? File.join(prefix, @path) : @path path = File.join(ENV['RACK_BASE_URI'].to_s, path) if ENV['RACK_BASE_URI'] path end
Generated with the Darkfish Rdoc Generator 2.