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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
7 views

ActiveAdmin: render index table of has many resource in show page of parent

Trying to build this with Active admin 3.0. This seems so basic to me that I feel I must be missing something. Let's assume I have a Store model and an Employee model and a store has many employees ...
Andrew's user avatar
  • 942
0 votes
0 answers
14 views

Rails ActiveAdmin decimal validation with error message

I am creating a form for my admin page which goes like this: form do |f| f.semantic_errors f.inputs "Basic Details" do f.input :number f.inputs "Tests", class: "input-...
Ishmeet Singh's user avatar
0 votes
0 answers
17 views

Paper_trail gem stopped working when upgraded ransack to 4.0.0

In my rails 7.0.4 app I use: activeadmin 3.0.0 ransack 4.0.0 paper_trail 15.0.0 I have the page for filtering and sorting history of changes to the data: ActiveAdmin.register PaperTrail::Version do ...
mirelon's user avatar
  • 4,906
0 votes
1 answer
26 views

Can anyone tell me why after_destroy is not working in active admin

I am using rails 5 and active_admin 2.0.0 I am using a callback in active admin like below after_destroy do |my_model| account_id = my_model.try(:account_id) Account.desable_something(...
Anil Kohli's user avatar
0 votes
0 answers
12 views

ActiveAdmin: Translation Missing with a Hash in the key name

I have a simple ActiveRecord model LocaleInfo. # Table name: locale_infos # # id :string not null, primary key # created_at :datetime not null # updated_at :...
Adeynack's user avatar
  • 1,200
0 votes
0 answers
13 views

Is there a REST Api for Active Admin?

Is there a way to access the data from Active Admin? Im creating a mobile app that will connect to an active admin website. I need to retrieve data from the website.
h3n's user avatar
  • 5,130
0 votes
1 answer
21 views

Display Rails Server Info in Active Admin

My ActiveAdmin Welcome Dashboard is looking a little empty. And I've been unable to find a way to get it to display the simple server info I'd like to see everytime I login. app/admin/dashboard.rb ...
mystic cola's user avatar
  • 1,465
0 votes
2 answers
28 views

How do i solve friendly id issue in active admin

I am using Rails 7 Active admin I have Project that is Workshop Project that is related to organizing workshops, booking them etc. I am using Friendly ID Gem . The url looks like http://127.0.0.1:3000/...
Muhammad Bilal's user avatar
0 votes
0 answers
10 views

Authorize actions on nested resources

Suppose I have a Project model and a Task model. Tasks belong to Projects, and projects have an "active" flag. class Project < ActiveRecord::Base def active? false # always false, ...
Jarrod Carlson's user avatar
0 votes
0 answers
28 views

How can i display Popup Modal forms in Rails activeadmin?

Hi I've just started using Rails Admin and I need to open popup modal form on certain model. To make it simple I would like to have a link which once clicked opens a modal form. How do I achieve this? ...
Ammar Qadir's user avatar
2 votes
1 answer
221 views

active admin gem error message just following the instructions

I am using ruby 3.1.3, rails 7.0.5 and activeadmin 3.0. I just followed the installation instructions from the activeadmin website, but I got the following error: ActionView::Template::Error (Ransack ...
NaguiHW's user avatar
  • 57
0 votes
0 answers
59 views

Adding Activeadmin to existing rails 6 Api with devise already installed

Hey I have a rails api app with devise and jwt installed already and working perfectly fine. I installed activeadmin to handle data management but when i try to navigate to /admin i get a message on ...
mutebi godfrey's user avatar
0 votes
1 answer
69 views

Ruby on Rails | String -> Links in ActiveAdmin

I have a SQL function in my ROR model def permit_needing_maps_link rows = ActiveRecord::Base.connection.exec_query("select dbo.NeedMapsList(#{self.CONO})").rows rows.flatten![0] if !rows....
Sean Gillespie's user avatar
0 votes
0 answers
24 views

in active admin i'm trying to send notification to all users in a single selection of all

i want to select all in a single go(https://i.stack.imgur.com/hBGmH.png) this is my input form. in user_selection i want to send notification to all without selecting on by oneenter image description ...
Pulkit Richhariya's user avatar
0 votes
0 answers
26 views

How to render filter in index page in active admin

I filter the index page using the filter. Then I go to the view page and come back to the index page. How can I retain the currently applied filter until the clear filter is clicked? Can someone ...
VR_1's user avatar
  • 113
0 votes
1 answer
45 views

Getting image to display rails application using Active Admin

First I would like to apologize if I'm asking a question that has been answered. I been looking and I can't find the answer I'm looking for or maybe I just don't understand the answers. I'm a Ruby ...
Havic's user avatar
  • 99
0 votes
0 answers
76 views

Issue with setting up actioncable

My project is set up as rails only API application, and flagged with no javascript. they have added active admin to it and made necessary changes to it making javascripts folder in assets as required ...
Aadhi's user avatar
  • 1
0 votes
0 answers
14 views

How to Format datetime_picker in ActiveAdmin?

I'm currently using ActiveAdmin in a Rails project and trying to format the datetime using datetime_picker. Here's the code I'm working with: f.input :schedule_date_time, label: 'Schedule Date', ...
15 Volts's user avatar
  • 1,946
0 votes
2 answers
39 views

How to change the tag column selection option

I have a tag column in the active admin index page like tag_column :result, interactive: true, sortable: false in my model I have a enum for result as enum result: { winner: 0, first_runner_up: 1, ...
VR_1's user avatar
  • 113
0 votes
0 answers
23 views

How to add sorting to a column with dynamic data in active admin

I have a column Average that gets the value :total from db and we are doing total/3 in average column. as follows index do selectable_column id_column column 'Average', sortable: true do |...
VR_1's user avatar
  • 113
0 votes
1 answer
134 views

Uninitialized constant Devise::SessionsController after upgrade

I have a rails 5.2 application that was built on ruby 2.7.1, devise 4.7.2, and activeadmin 2.9.0. I want to update it to the current versions. When I update ruby to 3.2.1, rails to 7.0, devise to 4.9....
amjad ahmad's user avatar
0 votes
0 answers
30 views

Active Admin pundit adapter, cannot initialize pundit with custom attribute for active admin

Hey Guys I am using Active Admin gem for admin panel and Pundit for authorization. Problem is I wanted new custom attribute in the policy scope so I modified it using pundit_user method in ...
Pavan Kumar V's user avatar
0 votes
1 answer
159 views

How to get the sum of column value using group in active record

I have a Table called Competiton with the following columns id contestant_id m1 m2 m3 total judge_id feedback 1 1 3 3 3 6 1 xxx 2 1 4 4 2 10 2 ...
VR_1's user avatar
  • 113
0 votes
1 answer
210 views

Custom member_action in Rails ActiveAdmin is not able to redirect to other routes

I have a Rails 6.1.7 app using Active Admin 2.13.1, for which I'm trying to create a custom member_action called :ensure_subtitles, but the redirection is proving troublesome. Everything I've tried ...
Lee Wang's user avatar
1 vote
1 answer
195 views

Rails 7 + Active Admin: Filtering using comma-separated values

rails 7.0.4 activeadmin 2.12.13 I have an admin page for the model Product. A Product contains a field product_number. I have the following code in admin/products.rb: filter :product_number_equals, ...
ragis's user avatar
  • 93
0 votes
0 answers
199 views

Rails in-line css for active admin

I'm beginner to rails and trying to use inline CSS in Rails active-admin form,I found :input_html would do the task for form inputs,how to do inline css for index and show ? Any ways to do the same or ...
Puneeth Kumar's user avatar
0 votes
1 answer
132 views

How to automatically include a concern in all Active Admin Page controllers?

I have the following concern: ./app/controllers/concerns/activity_helper.rb module ActivityHelper extend ActiveSupport::Concern included do before_action :my_method, except: %i[update destroy]...
adhu's user avatar
  • 35
0 votes
0 answers
21 views

ActiveAdmin: has_many associative records are commiting changes before parent object on patch failure

I'm having an issue with Rails ActiveAdmin (quite a novice myself still) where a has_many association (CampaignCountry) is deleting/adding records incorrectly when its select input field :countries is ...
jalva's user avatar
  • 15
0 votes
0 answers
124 views

ActiveAdmin: Issue with permitted params

When trying to update a user in ActiveAdmin, I get the following error: Unpermitted parameter: :roles. Context: { controller: Admin::UsersController, action: update, request: #<ActionDispatch::...
Rosario Alessandro Cali's user avatar
0 votes
0 answers
57 views

Rails 7 - ActiveAdmin scope for ActiveStorage

I use ActiveStorage to store 'photos' and "avatar" for Profile model. My activeadmin resource: ActiveAdmin.register ActiveStorage::Attachment do scope :...
Wordica's user avatar
  • 2,427
1 vote
2 answers
70 views

How t o display uploaded image in react

I have uploaded an image with active storage in rails and attached it to a model but am stuck with how i an display it with the rest of the data. Am using react and ruby at the back end both combined ...
mutebi ug official's user avatar
0 votes
0 answers
65 views

how to display correct value in xml in active admin

when I click on XML from Download: CSV XML JSON on the index page I am redirected to another page with the following content This XML file does not appear to have any style information associated ...
VR_1's user avatar
  • 113
0 votes
0 answers
64 views

undefined method `create!' for ActiveAdmin Comments

ActiveAdmin suddenly started to display this error when I try to create a comment on any model. NoMethodError in Admin::CommentsController#create undefined method `create!' for #<Admin::...
marimaf's user avatar
  • 5,380
0 votes
0 answers
44 views

Rails ActiveAdmin Batch Action on View/Show Page Grid

Rails ActiveAdmin offers native selectable_column element for batch action, and I found a plugin gem 'active_admin_scoped_collection_actions' Both are excellent options for the INDEX page, but can I ...
Sean Gillespie's user avatar
0 votes
1 answer
135 views

Rails ActiveAdmin - How to remove Add New button which is added by default?

In rails 6, I am using activeadmin gem for admin interface. My code is like, ActiveAdmin.register Account, as: "Individual Accounts" do menu parent: "Accounts", label: "...
Shruthi R's user avatar
  • 1,873
0 votes
1 answer
134 views

ActiveAdmin filter via activerecord association

In a rails project I have two models: # id # email # password class User < ApplicationRecord has_many :guests, dependent: :destroy end # id # name class Guest < ApplicationRecord belongs_to ...
DoubleD's user avatar
  • 183
0 votes
0 answers
39 views

I upgraded my rails version from 6.1 to 7 but facing the following issue related to activeadmin

I have Implemented many solutions including Rails.application.config.after_initialize do But, still it is throwing this error. `uninitialzed constant InheritedResources::Base (NameError) class ...
Shahzad Younas's user avatar
0 votes
0 answers
20 views

Will these steps secure access to ActiveAdmin?

I'm using ActiveAdmin for a new online marketplace. Security is very important to ensure we keep our customers safe on our platform. Please give advice on how to secure access to ActiveAdmin. Listed ...
Rusty's user avatar
  • 1
0 votes
1 answer
62 views

Active Admin : How to restrict active admin routes in production

I developed a normal (Post) like rails application that has features of posting articles with pictures then I opted for active admin in regulating the post as in (admin user), so the application ...
user avatar
0 votes
1 answer
189 views

Is there a way to set the css class of panels/tables/etc in ActiveAdmin

It would be great to color the table or elements in a table differently if based on attributes of the record(s). For examples, I have a table of different media, and I want to style the show table for ...
Philippe Huibonhoa's user avatar
0 votes
1 answer
89 views

How to generate an activeadmin resource in a custom directory instead of admin directory?

After making changes in initializers/active_admin to work with two namespaces , I m facing to the problem of generating new resources in my custom directory, i want to separate the user's resources ...
amani's user avatar
  • 1
1 vote
1 answer
50 views

How to encrypt information in ActiveAdmin comments?

this is a general can I do this and if so, how, type question. ActiveAdmin has a nifty built in ActiveAdmin::Comments class which enables a "comments" section to be dropped into an ...
Jonathon Nordquist's user avatar
0 votes
0 answers
201 views

How to Store String Array via ActiveAdmin in Ruby on Rails

I have a model with an attribute that stores array into the database. Here's what it looks like: // It has over 5 fields but the field tags is a string array. All others are just strings. class ...
Sumanth Jois's user avatar
  • 3,156
0 votes
0 answers
54 views

ActiveAdmin register "as" original model still in menu bar?

I registered my Territory model as "Division" in the admin page, however "Territories" still shows up in the menu bar (screenshot for reference). The Divisions page under the Data ...
Johnathan Barr's user avatar
1 vote
3 answers
560 views

ActiveAdmin / Formtastic - How to have an input that is not associated to the model?

I'm using activeadmin and in a form associated with a model I would need to add a checkbox that is not tied to any of the model attributes. It should be just a checkbox that won't allow to submit the ...
sekmo's user avatar
  • 1,527
0 votes
0 answers
25 views

ActiveAdmin optional belongs_to

How do you work with an optional association in ActiveAdmin? I have two models, class A self.primary_key = :serialnumber has_many :bs, foreign_key: :a_serialnumber, inverse_of: :a end and class B ...
fynsta's user avatar
  • 348
0 votes
0 answers
56 views

Named route on ActiveAdmin

I created an ActiveAdmin controller: ActiveAdmin.register InboundNumber do controller do def create whatever end and I can see the route after run the "$ rails routes" ...
aarkerio's user avatar
  • 2,193
0 votes
0 answers
37 views

how to create ActiveAdmin page for custom route

I would like to create a new page for a custom route, i.e. localhost:3000/admin/[record_name]/:id/[custom_route] I need full customisability of the custom_route.html page as well. I was not able to ...
NovemberSpawn's user avatar
0 votes
1 answer
103 views

Is there a way to get the page name, for resource pages, in ActiveAdmin?

I am doing a sort of permission feature with groups where each group has different permission to access the ActiveAdmin pages. But some pages do not have the same name as their model... ActiveAdmin....
Bruno Aguiar de Souza's user avatar
0 votes
0 answers
91 views

How to query database or call model function from active admin javascript file (ruby on rails)

In my active admin app I have a push_announcement.rb view where I can filter who I want to send the notifications to. Inside active_admin.js, after getting all of the form variables what I want to do ...
Giovani Quimelli's user avatar

1
2 3 4 5
73