First working version with devise+rails_admin

This commit is contained in:
dlage committed 2020-08-19 07:31:31 +01:00
1 parent 8eadda6a48
commit 1bc17c462a
21 files changed
+230 -38

No files matched your search

+6
View File
@@ -12,3 +12,9 @@ Rails.application.config.assets.paths << Rails.root.join('node_modules')
# application.js, application.css, and all non-JS/CSS in the app/assets
# folder are already added.
# Rails.application.config.assets.precompile += %w( admin.js admin.css )
# Workaround for Segfault
# https://github.com/sass/sassc-ruby/issues/197
Rails.application.config.assets.configure do |env|
env.export_concurrent = false
end
+3 -3
View File
@@ -143,7 +143,7 @@ Devise.setup do |config|
# without confirming their account.
# Default is 0.days, meaning the user cannot access the website without
# confirming their account.
# config.allow_unconfirmed_access_for = 2.days
config.allow_unconfirmed_access_for = 2.days
# A period that the user is allowed to confirm their account before their
# token becomes invalid. For example, if set to 3.days, the user can confirm
@@ -151,7 +151,7 @@ Devise.setup do |config|
# their account can't be confirmed with the token any more.
# Default is nil, meaning there is no restriction on how long a user can take
# before confirming their account.
# config.confirm_within = 3.days
config.confirm_within = 3.days
# If true, requires any email changes to be confirmed (exactly the same way as
# initial account confirmation) to be applied. Requires additional unconfirmed_email
@@ -164,7 +164,7 @@ Devise.setup do |config|
# ==> Configuration for :rememberable
# The time the user will be remembered without asking for credentials again.
# config.remember_for = 2.weeks
config.remember_for = 8.weeks
# Invalidates all the remember me tokens when the user signs out.
config.expire_all_remember_me_on_sign_out = true
+2
View File
@@ -1,6 +1,8 @@
Rails.application.routes.draw do
get 'pages/home'
mount RailsAdmin::Engine => '/admin', as: 'rails_admin'
# For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
devise_for :admins
root to: "pages#home"
end