如何在门卫中将此属性称为范围注入此属性?

时间:2016-09-30 20:47:55

标签: ruby-on-rails doorkeeper

在门卫中,我看到following code

def generate_routes!(options)
        @mapping = Mapper.new.map(&@block)
        routes.scope options[:scope] || 'oauth', as: 'oauth' do
          map_route(:authorizations, :authorization_routes)
          map_route(:tokens, :token_routes)
          map_route(:tokens, :revoke_routes)
          map_route(:applications, :application_routes)
          map_route(:authorized_applications, :authorized_applications_routes)
          map_route(:token_info, :token_info_routes)
        end
      end

“routes.scope”上的“scope”属性来自哪里?它是以某种方式通过ActionDispatch注入的吗?

0 个答案:

没有答案