Registrar refactor

This commit is contained in:
Priit Tark 2015-04-09 17:09:18 +03:00
parent 6573d81b94
commit ec4c06bb06
95 changed files with 564 additions and 539 deletions

View file

@ -32,9 +32,7 @@ module Registry
# Autoload all model subdirs
config.autoload_paths += Dir[Rails.root.join('app', 'models', '**/')]
# Autoload depp gem
config.autoload_paths += %W(#{config.root}/vendor/gems/depp/lib)
config.autoload_paths << Rails.root.join('lib')
# Add the fonts path
config.assets.paths << Rails.root.join('vendor', 'assets', 'fonts')

View file

@ -1,6 +1,10 @@
# Use this hook to configure devise mailer, warden hooks and so forth.
# Many of these configuration options can be set straight in your model.
Devise.setup do |config|
config.warden do |manager|
manager.failure_app = DeviseCustomFailure
end
# The secret key used by Devise. Devise uses this key to generate
# random tokens. Changing this key will render invalid all existing
# confirmation, reset password and unlock tokens in the database.
@ -258,3 +262,4 @@ Devise.setup do |config|
# so you need to do it manually. For the users scope, it would be:
# config.omniauth_path_prefix = '/my_engine/users/auth'
end

View file

@ -15,7 +15,11 @@ Rails.application.routes.draw do
get 'error/:command', to: 'errors#error'
end
mount Repp::API => '/'
namespace :registrar do
root 'polls#show'
resources :invoices
devise_scope :user do
@ -29,12 +33,6 @@ Rails.application.routes.draw do
get 'logout' => '/devise/sessions#destroy'
end
# authenticated :user do
# root to: 'domains#index', as: :authenticated_root
# end
root to: redirect('/registrar/depp')
resources :domains do
collection do
post 'update', as: 'update'
@ -72,11 +70,9 @@ Rails.application.routes.draw do
get 'load_xml'
end
end
root 'polls#show'
end
## ADMIN ROUTES
# ## ADMIN ROUTES
namespace :admin do
resources :keyrelays
@ -143,5 +139,5 @@ Rails.application.routes.draw do
get 'login' => 'admin/sessions#login'
end
root to: redirect('login')
root to: redirect('admin/login')
end