Sha256: b57d4cca12cfb186523e5db20b850abd74be79a224c9eecc641b2418f63319bf

Contents?: true

Size: 402 Bytes

Versions: 6

Compression:

Stored size: 402 Bytes

Contents

# In development mode, we need to ensure that all controllers are loaded,
# because that's how AdminAssistant knows what routes to create
unless Rails.configuration.cache_classes
  Find.find("#{Rails.root}/app/controllers") do |path|
    if path =~ /\.rb$/
      require path
    end
  end
end

Rails.application.routes.draw do
  AdminAssistant.routes.each do |route|
    route.add(binding)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
admin_assistant-2.2.0 config/routes.rb
admin_assistant-2.1.1 config/routes.rb
admin_assistant-2.1.0 config/routes.rb
admin_assistant-2.0.1 config/routes.rb
admin_assistant-2.0.0 config/routes.rb
admin_assistant-2.0.0.pre2 config/routes.rb