Sha256: afbb310ca5b2e46ce05915b07feaba3bccbe665d7406efcc72860f280f0b9914
Contents?: true
Size: 554 Bytes
Versions: 10
Compression:
Stored size: 554 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 controllers_path = "#{Rails.root}/app/controllers" AdminAssistant.all_files_under(controllers_path).each do |path| if path =~ /\.rb$/ if File.readlines(path).any? { |line| line =~ /admin_assistant_for/ } require path end end end end Rails.application.routes.draw do AdminAssistant.routes.each do |route| route.add(binding) end end
Version data entries
10 entries across 10 versions & 1 rubygems