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

How to use modules to split very long code in active admin?
Downloading all records of a paginated resource in ActiveAdmin
Can you use the Form() command in ActiveAdmin in the content of a custom page?
CollectionAction route being skipped, action treated as ID
Possible to “split” an ActiveAdmin resource between multiple menu items?
Rails: activeadmin, undefined method `per' for #<ActiveRecord::Relation:0x4d15ee0>
Active Admin create form in register_page
ActiveAdmin - how to customize edit action?
ActiveAdmin - Filter with default value
Make semantic_errors render the exact error-message
ActiveAdmin - Custom action with reusing the show form
make checkboxes for a has_many :through association using Formtastic
CopyCopter with ActiveAdmin gets loads of Timeout Errors.
Rails ActiveAdmin - after creating a post I wish to render an action
Translation models name in active admin
Active Admin member action

Categories

HOME
google-chrome
xpath
visual-studio
spring-data
artificial-intelligence
yaml
shinyapps
concurrency
plpgsql
embedded-resource
risk-management
magento-2.0
cypher
openflow
elk-stack
angular-meteor
kurento
msmq
angular4
synthesis
heap-dump
reselect
susy-sass
psql
cmake-gui
jest
bosun
mime-types
quantitative-finance
sybase-ase
ratio
fusetools
uri
network-analysis
sfml
guice
om-next
payeezy
dreamfactory
pdfminer
keyboard-layout
landscape
netstat
love2d
code-rally
unification
gitolite
best-buy-api
spring-restcontroller
spooler
jqgrid-asp.net
transparency
daz3d
dredd
icecast
comm
webvtt
cocoa-bindings
portal
mathjs
zynq
gcloud-node
traversable
yii2-model
apple-configurator
urbit
jeditable
textblock
certificate-authority
webgrind
dsa
fantom
green-threads
componentart
wicked-gem
htmltidy
sql-processor
google-hangouts
cakephp-2.2
lmax
csslint
hyperloglog
sqlbindparameter
preorder
oxygene
armv6
illuminate-container
mousemotionlistener
node.js-stream
chartfx
flv
html-frames
cmath
ntlmv2
significant-digits
struts2-json-plugin
border-box
trialware
expression-web
datacontracts
vows
multiple-users
powergui
main-method
gtktextview
gui-designer
jvm-bytecode

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App