fix clockwork variables

This commit is contained in:
Lee Lawlor 2014-09-16 15:15:45 -04:00
parent 1d7e9cd221
commit 805fb597b2
2 changed files with 5 additions and 2 deletions

View File

@ -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

View File

@ -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