activeadmin


Active admin and Pundit


I have some difficulties to install Active Admin gem in Rails with Pundit.
In my Gemfile
gem 'activeadmin', github: 'activeadmin'
In my active_admin.rb
def authenticate_admin!
redirect_to new_user_session_path unless current_user && current_user.admin
end
ActiveAdmin.setup do |config|
# [...]
config.authentication_method = :authenticate_admin!
# [...]
config.current_user_method = :current_user
# [...]
config.logout_link_path = :destroy_user_session_path
# [...]
config.logout_link_method = :delete
end
I have this error when I go to /admin :
Pundit::PolicyScopingNotPerformedError at /admin
I think i have to define a policy but I don't know where. Do you have a good tutorial for this ?
I think you use something like this to verify the policy usage.
class ApplicationController < ActionController::Base
include Pundit
after_action :verify_authorized, except: :index
after_action :verify_policy_scoped, only: :index
end
ActiveAdmin don't support this checks. You can't configure them in the ApplicationController or you need to skip them for all ActiveAdmin Controllers

Related Links

AuthorizationAdapter in ActiveAdmin
ActiveAdmin and Rails Engine. How do you keep the path name the same?
Active admin defining scope for custom page
ActiveAdmin: Can I redirect the user to the index after they create/edit something?
Active admin and Pundit
Sortable for has_many does not sort properly
select2 remove tag_list item
Adding Numeric Range Filtering to ActiveAdmin
undefined method `destroy_user_session_path' for active admin with cancancan and sorcery
Active admin not working in production mode
ActiveAdmin cannot authorize in rails-api project
How can I create an ActiveAdmin filter that will show only objects without a value specified?
jQuery, activeadmin: custom filter with ransack. how to alter displayed text in search box
ActiveAdmin lable name cant be singular
ActiveAdmin not decorating show view
activeadmin custom filter that contains 2 words on the same attribute

Categories

HOME
spring-data
xcode
qc
tcsh
embedded-resource
mathematical-optimization
visualforce
cdi
wagtail
native-base
heuristics
feature-extraction
ex
pinterest
jqxgrid
exec-maven-plugin
word2vec
salt-cloud
bazaar
infrared
pe
channel
introspection
beego
hdmi
hevc
points
math.js
php-5.3
locks
d3.js-v4
google-play-developer-api
knights-tour
appcode
listjs
mongoengine
keyboard-layout
bluemixtools
xvfb
ms-solver-foundation
xll
task-parallel-library
imgur
swfupload
vb.net-to-c#
elasticsearch-aggregation
fluid-mac-app-engine
sendinput
permission-denied
asihttprequest
dredd
viewmodel
.net-micro-framework
webalizer
supertest
gestures
mura
deedle
openerp-6
cognos-tm1
d3v4
gawk
dcount
node.js-connect
frame-grab
onepage-checkout
m4
ipod
scala-macros
ssmtp
createfile
operands
cakephp-2.2
vs-unit-testing-framework
dmake
loginview
aho-corasick
bittorrent-sync
pageviews
usb-flash-drive
spring-social-linkedin
visual-c++-2005
ember-table
node.js-stream
ldif
bcdedit
unicoins
icenium
live-wallpaper
struts2-s2hibernate
kobold2d
hardcode
uploading
gwt-celltable
motodev-studio
startupscript
gaelyk
tessellation
firephp

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App