diff --git a/config/application.rb b/config/application.rb index 1ee183e..20aab81 100644 --- a/config/application.rb +++ b/config/application.rb @@ -11,6 +11,9 @@ module Thingspeak # config.autoload_paths += %W(#{config.root}/extras) config.autoload_paths += %W(#{config.root}/lib) + # remove active admin paths if clockwork gem is used + config.eager_load_paths -= %W(#{config.root}/app/admin) if $clockwork == true + # fix invalid utf8 characters config.middleware.insert_before "Rack::Runtime", Rack::UTF8Sanitizer diff --git a/config/routes.rb b/config/routes.rb index a339da7..35dbca1 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -17,9 +17,9 @@ Thingspeak::Application.routes.draw do # for api: login and get token match 'users/api_login', :to => 'users#api_login', :via => [:get, :post] - # devise for authentication (but don't use devise if $skip_devise == true, necessary for clockworkd to run) + # devise for authentication # override devise controllers and use custom sessions_controller and registrations_controller - devise_for :users, :controllers => {:sessions => 'sessions', :registrations => 'registrations'} if $skip_devise != true + devise_for :users, :controllers => {:sessions => 'sessions', :registrations => 'registrations'} resource :pages do collection do