Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adding an options attribute to ProjectModule

  • Loading branch information...
commit 35844fc3aa3a64050c3eadddda6b4f54aee0aa3c 1 parent c079e1a
Simon COURTOIS authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 padrino-admin/lib/padrino-admin/access_control.rb
View
10 padrino-admin/lib/padrino-admin/access_control.rb
@@ -145,9 +145,9 @@ def protect(path)
##
# Create a project module
#
- def project_module(name, path)
+ def project_module(name, path, options={})
allow(path)
- @project_modules << ProjectModule.new(name, path)
+ @project_modules << ProjectModule.new(name, path, options)
end
end # Authorization
@@ -155,10 +155,10 @@ def project_module(name, path)
# Project Module class
#
class ProjectModule
- attr_reader :name
+ attr_reader :name, :options
- def initialize(name, path) # @private
- @name, @path = name, path
+ def initialize(name, path, options={}) # @private
+ @name, @path, @options = name, path, options
end
##
Please sign in to comment.
Something went wrong with that request. Please try again.