权限Gem rails应用程序需要重新启动才能反映每个更改?

时间:2014-05-29 21:06:04

标签: ruby-on-rails ruby authorization

您好我正在使用权限应用程序为我的rails应用添加权限。出于某种原因,每次我想要反映app / authorizers /文件夹中的更改时,我都必须重新启动我的应用程序。

这是标准吗?为什么会这样?

有解决方法吗?

即使是一个很小的改变,例如将默认值从true更改为false,也需要重新启动应用程序才能向authory注册

app/authority/application_authorizer.rb

# Other authorizers should subclass this one
class ApplicationAuthorizer < Authority::Authorizer

  # Any class method from Authority::Authorizer that isn't overridden
  # will call its authorizer's default method.
  #
  # @param [Symbol] adjective; example: `:creatable`
  # @param [Object] user - whatever represents the current user in your app
  # @return [Boolean]
  def self.default(adjective, user)
    # 'Whitelist' strategy for security: anything not explicitly allowed is
    # considered forbidden.
    true
  end
end

由于

0 个答案:

没有答案