Questions tagged [activeadmin]

Active Admin is a Ruby on Rails plugin for generating administration style interfaces. It abstracts common business application patterns to make it simple for developers to implement beautiful and elegant interfaces with very little effort.

Active Admin is a Ruby on Rails plugin for generating administration style interfaces. It abstracts common business application patterns to make it simple for developers to implement beautiful and elegant interfaces with very little effort.

Documentation can be found at https://activeadmin.info/.

3600 questions
25
votes
5 answers

Eager loading associated models in ActiveAdmin sql query

I've got an ActiveAdmin index page ActiveAdmin.register Bill And I am trying to display links to associated models index do column "User" do |bill| link_to bill.user.name, admin_user_path(bill.user) end end But I run into the N+1 query…
tomblomfield
  • 889
  • 2
  • 9
  • 11
25
votes
2 answers

Two pages for the same resource - ActiveAdmin

Currently I have User model, which is registered in user.rb as a new resource for ActiveAdmin. Generated page displays all users with scopes (all/journalists/startup_employees). Now I want to create another page for the same resource, and the same…
ciembor
  • 7,189
  • 13
  • 59
  • 100
24
votes
4 answers

ActiveAdmin - generate link to index, with filter preset?

In an ActiveAdmin page, I would like to include a link to a list of related resources. For example, given that a Site has_many Sections and, Section belongs_to a Site (in my ActiveRecord models), I would like my Site's show page to include a link…
jgshurts
  • 709
  • 5
  • 7
24
votes
6 answers

activeadmin: adding delete for a nested resource

I have a infrastructure object composed for many datacenters. In the apps/admin/infrastructures.rb I have the following code: form do |f| f.inputs "Infrastructure details" do f.input :name f.has_many :datacenters do |datacenter_form| …
Seoman
  • 783
  • 1
  • 7
  • 18
23
votes
2 answers

How to customize the default login page in ActiveAdmin?

The Problem I'm trying to customize the default login page in ActiveAdmin, but I'm having trouble getting the customizations to go through. What I've tried A commenter on this RailsCasts episode suggests copying this file to…
user456584
  • 86,427
  • 15
  • 75
  • 107
21
votes
2 answers

How to limit access to active admin to admin users

I want that only my users who have their attribute is_admin set to true to be able to access my active admin backend how should I do this? "Normal" users should only be able to login to the site, not to active admin.
Jasper Kennis
  • 3,225
  • 6
  • 41
  • 74
21
votes
4 answers

How do you change ActiveAdmin password?

I got ActiveAdmin running with admin@example.com//password, but I want to change these credentials. Anyone know how to change them?
kidcapital
  • 5,064
  • 9
  • 46
  • 68
21
votes
4 answers

ActiveAdmin forms with has_many - belongs_to relationships?

I have the models Home and Photo, which have a has_many - belongs_to relationship (a polymorphic relationship, but I dont think that matters in this case). I am now setting up active admin and I would like admins to be able to add photos to homes…
agente_secreto
  • 7,959
  • 16
  • 57
  • 83
21
votes
5 answers

How to filter IS NULL in ActiveAdmin?

I've a table with an integer column called "map_id", I want to add an activeadmin filter to filter if this column IS NULL or IS NOT NULL. How could this be implemented ? I tried the following filter filter :map_id, :label => 'Assigned', :as =>…
20
votes
1 answer

How do I use Devise and ActiveAdmin for the same User model?

I have ActiveAdmin and Devise working with Users. I would like to use Devise to log in regular non-admin users with the same User model. How can I do this? (I want to have an admin flag in the User model for only admins.) I tried adding the 2nd line…
Chloe
  • 25,162
  • 40
  • 190
  • 357
19
votes
6 answers

Rails ActiveAdmin - change the after update redirect_to

I have a Feature page that belongs to the Car page. That is working exactly how I want to, except for one thing. After creating, updating or destroying, I want the page to be redirected to the admin_car_path(car) instead of the defaults…
Marcelo
  • 1,702
  • 2
  • 24
  • 42
19
votes
2 answers

Active Admin - flash messages not appearing on page

I am trying to display a notice after redirecting to a page but it doesnt appear. Here is the redirect - redirect_to :action => :index, :notice => "My redirect" You can see the message in the url but there doesnt seem to be any code inside active…
Alex
  • 6,205
  • 7
  • 43
  • 53
19
votes
4 answers

Nested form in active_admin with select or create option

We are using active_admin for our administration backend. We have a model "App" that :belongs_to model "Publisher": class App < ActiveRecord::Base belongs_to :publisher end class Publisher < ActiveRecord::Base has_many :apps end When creating…
Carsten
  • 593
  • 5
  • 12
19
votes
4 answers

ActiveAdmin Comment model not working properly

I created a blog by following the Getting Started with Rails precisely. And then I following the tutorial here to try ActiveAdmin: http://activeadmin.info/documentation.html. It's working fine for the Post and Tag models (I logged in and…
emurad
  • 3,448
  • 10
  • 40
  • 47
19
votes
2 answers

Active Admin Ruby on rails Dashboard Controller Error

All of a sudden my app seems to have developed a routing error uninitialized constant DashboardController I am running Rails 3.2.0 with ActiveAdmin (0.6.0) and up until today everything seemed to be working fine. The log is reporting the following…
Tom Pinchen
  • 2,467
  • 7
  • 33
  • 53