Skip to main content

All Questions

Filter by
Sorted by
Tagged with
1 vote
1 answer
66 views

ActiveAdmin deletes associations when simply trying to render show page

Here's the show.html.arb file: attributes_table_for resource do row :id row :state row :request_type row :assignee row :assigner row :unassigned row :deleter end attributes_table_for ...
Nick Res's user avatar
  • 2,234
0 votes
1 answer
142 views

How to change any by all in active admin collection data?

I am using collection for filter data. filter :"status" , :as => :select, :collection => User::STATUS I want to change default option label any by all. How to do it in active admin?
Ritu Rajora's user avatar
3 votes
1 answer
1k views

Boolean on active admin field returns empty instead false (Rails 3.2/Active Admin)

I have a form called User with a boolean attribute called 'confirmed'. When I display all users or try to view each user, the confirmed value is always empty instead of false and I have searched alot ...
Haytham.Breaka's user avatar
0 votes
1 answer
171 views

How to make activeadmin 0.4.3 work with Rails 3.2.22.2 (Undefined mixin 'box-shadow')?

I'm trying to update a Rails app 3.1.10 to 3.2.22.2 with the same activeadmin version 0.4.3 if possible. I have tried to create a fresh Rails 3.2.22.2 install with activeadmin 0.4.3, 0.4.4, 0.5.0... ...
fro_oo's user avatar
  • 1,610
0 votes
1 answer
1k views

undefined method `to_i' for :offstfsal:Symbol

I am getting the error undefined method `to_i' for :offstfsal:Symbol in activeadmin. Looks like to_i has been removed. Any suggestion would be helpful. index :title => "Office Expenses" do ...
Vivek S's user avatar
  • 107
3 votes
1 answer
99 views

ActiveAdmin assets loading in production env

For some reason, some activeadmin's assets (js scripts) can't be loaded for production env. I have code to initialize the js. $(document).ready(function () { console.log('ready'); hljs....
NeverBe's user avatar
  • 5,038
0 votes
1 answer
557 views

ActionView::Template::Error (wrong number of arguments (6 for 4..5)) with rails, active admin and simple form

I have an app with rails4, activeadmin and simpleform. I have changed my simple_form.rb config. Since then, when I visit localhost:3000/admin/login, I get: ActionView::Template::Error (wrong number ...
Benjamin Crouzier's user avatar
2 votes
1 answer
477 views

How to add extra param on best_in_place field update in ruby

I am using best_in_place gem for In-line edit for a field in active admin. Please look at my code below, column "Badge ID", :number do |event| best_in_place event, :number, :type => :input, :...
Breen ho's user avatar
  • 1,631
2 votes
0 answers
687 views

Show two tables in activeadmin index do

In my application I have following code: index do sortable_handle_column column :key column :text do |post| text(post.text) end column :visible default_actions end Now I want to add ...
Sanna Widell's user avatar
0 votes
1 answer
82 views

select versions from only one type in paper_trail

I want to select only the versions from papertrail where the type is "user". Is there any way to get the 5 latest changes for the type User ? Now i have it like below, but this gives me the 5 latest ...
Sanna Widell's user avatar
0 votes
1 answer
2k views

ActiveAdmin expand collapse in form

Im using activeadmin with rails 3.2.13 and ruby 2.1.2p95 and I would like to customize the form view. I have seen alot of different things that is possible to do, but I need to be able to expand and ...
Sanna Widell's user avatar
0 votes
0 answers
262 views

How to create custom filter for active admin

The default filter options for referrer and referrals shows user object references instead of their email. I need to create custom filter for active admin based on a referrer's email and each users ...
Alfie's user avatar
  • 2,784
0 votes
1 answer
58 views

Filtered has_many relationship form

I have simple form to display a model with has_many relationship. form do |f| f.semantic_errors *f.object.errors.keys f.inputs do f.has_many :messages, allow_destroy: true, heading: ...
NeverBe's user avatar
  • 5,038
2 votes
1 answer
371 views

Active Admin Nested models not populating in edit

So, I've been tinkering around with Active Admin, and so far even though the documentation is not great I've been sailing along. But I encountered an issue when I try to edit a model with a few ...
Adanos's user avatar
  • 111
3 votes
4 answers
5k views

Undefined mixin 'box-shadow' with Active Admin Editor

I have a Rails 3.2 app using ActiveAdmin 1.0 and I'm using the active_admin_editor gem here. Anytime I try to load the I get the error below. The front end loads fine and also if I remove the ...
stiweb2003's user avatar
0 votes
2 answers
143 views

CSS styles broken after updating Active Admin 0.6.0

I was wondering if anyone might have some experience with this: I updated Active Admin 0.6.0 (and four dependencies), and now the stylesheets aren't loading properly in the app, (broken on my machine ...
Patrick's user avatar
  • 716
1 vote
2 answers
1k views

How to remove activeadmin's batch action routes

Using Rails 3.2.12, active_admin 0.6.2/0.6.3, I have disabled batch actions in my ActiveAdmin initializer: config.batch_actions = false However, rake routes shows batch action routes for all my ...
Isaac Betesh's user avatar
  • 3,000
0 votes
1 answer
85 views

Ruby On Rails runs some database queries after the server starts?

I have a Rails app that runs a lot of likely unnecessary data queries when the server starts. I would like to know how to prevent that. Is there a way to detect what makes the queries run? My app ...
ipegasus's user avatar
  • 15.2k
2 votes
1 answer
441 views

Active Admin Mongoid Custom Filter

I am using this piece of code to filter out the users with either email or alternate email specified in the filter search as supported by Meta search which is used in Active Admin. ActiveAdmin....
Eliza A's user avatar
  • 152
0 votes
2 answers
638 views

Calculate quantity based on one Category attribute in Active Admin Dashboard (Rails 3.2/ active-admin 1.0)

I am building a daily deal app to learn on Ruby on Rails. My basic models are: Deals Agencies (the one who would feature the deal). One of the attributes of Agencies is "agency_type" where I ...
Mathieu's user avatar
  • 4,787
1 vote
1 answer
215 views

period in id in url creates issue with active admin

#routes.rb resources :users , :constraints => { :id => /[^\/]+/ } namespace :admin do resources :users , :constraints => { :id => /[^\/]+/ } end when I call a route /users/abc.efg ...
Pritesh Jain's user avatar
  • 9,146
3 votes
1 answer
2k views

How to hide Edit and Delete actions from Show view in ActiveAdmin?

just added Active Admin to my project. I want hide the Edit & Delete action form the Show page, and Edit & Delete action should present in Index page. Is there a better way to do this? Thanks ...
Sampat Badhe's user avatar
  • 9,035
0 votes
1 answer
138 views

Show page, show associations

i try to find out how i can show associations deeper than one level. Show at my FORM, i just done it there: form do |f| f.inputs "Details" do f.input :name f.input :item_category f.input :...
Maikel Urlitzki's user avatar
5 votes
1 answer
3k views

ActiveAdmin error uninitialized constant ActiveAdmin::Dashboards

ActiveAdmin dashboard is no longer working after upgrading to 0.6.1. The dashboard now returns the error: /app/app/admin/dashboards.rb:1:in `<top (required)>': uninitialized constant ...
jimagic's user avatar
  • 4,065
1 vote
1 answer
774 views

activeadmin and has_many relationships

I'm sure the answer to this is out there, but I can't seem to find it. So, I apologize in advance. I had a perfectly functioning very basic Active Admin interface managing a handful of simple models....
Greg Rogers's user avatar
  • 1,031
7 votes
1 answer
4k views

Write controller and feature specs for ActiveAdmin using RSpec?

How does one write a controller and feature spec for the following ActiveAdmin code: # app/admin/organization.rb ActiveAdmin.register Organization do batch_action :approve do |selection| ...
scarver2's user avatar
  • 7,985
0 votes
1 answer
367 views

Rails Active Admin Coffescript not compiling in production

Rails 3.2 I have a coffee script file which works fine in development. When I push to prod I get this error when I go to the login page: ActionView::Template::Error (utils.js.coffee isn't precompiled)...
ScottJShea's user avatar
  • 7,111
0 votes
1 answer
344 views

Ruby on Rails Active Admin: Email Not Displaying after Login

So I have a regular user, an admin user, and an oauth user type. I changed quite a few things to get them to work right, but now active admin is no longer displaying the email address in the upper-...
mystic cola's user avatar
  • 1,631
7 votes
3 answers
3k views

ActiveAdmin with CanCanAdapter causing infinite redirect on dashboard

When using the CanCan adapter in ActiveAdmin 0.6.0. I have a resource working and authorization is working. However, when I go to /admin, the root ActiveAdmin page, it redirects to /admin and ...
Robin Daugherty's user avatar
1 vote
1 answer
110 views

Active admin default links only for certain users

In active admin, I want to only let certain users be able to download csv of table data. I know how to shut it off for all users like this: index :download_links => false do # columns end ...
NielMalhotra's user avatar
  • 1,375
2 votes
1 answer
3k views

Active admin - Filters from right to left - Table Scroll bar - css/layout/structure changes

I'm using active admin gem on Rails. I haven't gone through everything, yet. 2 clarifications: I want to display the filters section (:id => "filters_sidebar_section") to my left hand ...
beck03076's user avatar
  • 3,298
5 votes
2 answers
3k views

Group records on activeadmin resource index page

I have 2 resources - Shelf and Book, where each Shelf has many Books. Is there any way to groups books (on Book index page) by Shelf? Specifically I would like to have Books sorted by Shelf and ...
misza222's user avatar
  • 393
0 votes
1 answer
435 views

How can I read config variables from Active Admin?

I have read documentation I did not find how to do this. I need to get default_namespace setting. Also if you could explain the process of find that method would be great.
sites's user avatar
  • 21.8k
1 vote
1 answer
4k views

Multiple File Upload ActiveAdmin Integration

I'm trying to create a form that has 3 models (1 for the actual form, 1 for other entries and another for the uploaded archives). I want to use jQuery File Upload gem to upload my PDFs to the server, ...
Rafael Fragoso's user avatar
0 votes
1 answer
1k views

ActiveAdmin Form with 2 models (belongs_to and has_many) don't work

I have the following code form my passport_visas.rb model ActiveAdmin.register PassportVisa do menu :label => "Visas" form :partial => "form" index :title => "Visas" end And this is ...
Rafael Fragoso's user avatar
3 votes
2 answers
2k views

datepicker in filters portion not show with created_at and updated_at fields using Active Admin Rails

I'm using Active admin and datepicker in filters portion(index page) not show with created_at and updated_at fields. I search enough and not find solution in any place. filter :created_at ,:as =&...
Kashiftufail's user avatar
  • 10.9k
2 votes
1 answer
2k views

401 redirect loop with Active Admin and Devise

I have an application with Devise (2.2.3) and Active Admin (0.5.1) I installed Devise first, and then Active Admin afterwards. The entire app needs to sit behind a login, so in my application ...
purpletonic's user avatar
  • 1,868
0 votes
2 answers
2k views

undefined method `reorder' for active admin

I am trying to use scope in active admin for one of my model and I get this error undefined method reorder' for array. I have successfully used scope in another model with active admin, I am not ...
Dev R's user avatar
  • 1,902
1 vote
2 answers
2k views

Rails active_admin : How to restrict admin_user to change other admin_users' passwords?

I have the following on my active_admin, which is just a default for admin_user model. This allows all the admin_users to change all other admin_users' passwords. Does anybody know how I can restrict ...
Dice's user avatar
  • 105
0 votes
1 answer
976 views

ActiveAdmin member_action gives 401 Unauthorized response

I am building a rails app using active_admin 0.5.1. In app/admin/plays.rb I defined an admin resource like this: ActiveAdmin.register Play do member_action :upload, :method => :post do ... ...
Alexander Presber's user avatar
1 vote
0 answers
1k views

Getting undefined method `user_id' in Active Admin

Hey I'm struggling a bit with the active admin setup related to my user model. I'm using devise. When I click on the User tab in active admin I get: NoMethodError in Admin/users#index Showing /...
bjoern's user avatar
  • 1,019
0 votes
1 answer
2k views

Validation message not displayed in active admin after renaming resource

My active admin's name was PartnerSite and after I added the validations the messages were prperly displayed. But after I renamed my active admin from Partner Site to Subdomain using ActiveAdmin....
Sailee Mogale's user avatar
1 vote
3 answers
2k views

Sorting parent menu items in activeadmin

I have a menu, with multiple :parent items. With :priority I can sort the items within a drop down menu. How can I sort my main menu parent items? I'm using the latest version of activeadmin
Arwed's user avatar
  • 1,755
4 votes
2 answers
3k views

ActiveAdmin and "uninitialized constant InheritedResources::Base"

I'm just trying ActiveAdmin. I've got the dashboard and some resources working, but now when I run for example a rails generator I got: % rails generate scaffold Post name:string .../.rvm/gems/ruby-1....
ddidier's user avatar
  • 1,298
3 votes
1 answer
2k views

How to override default sort order in scoped_collection of active admin 0.5.0

I have the following code in my events.rb. By default I am setting sort_order as updated_at_desc. But if url is has a parameter ride_id (http://localhost:3000/admin/events?ride_id=3009) I need to ...
Amal Kumar S's user avatar
0 votes
1 answer
177 views

Routing Error, import csv

I want to upload a csv file using active admin, and I would like to know if this is possible, create a from_tag inside of a f.input: <%= f.inputs do%> <%= f.input :contact, :as => ...
Anna's user avatar
  • 203
19 votes
2 answers
17k views

How to add time picker in Active Admin + Rails 3

I need to display time selector in my active admin form. I have a field start_time which is of type time. Currently I have drop-downs. I need a selector similar to date picker as shown For adding ...
Amal Kumar S's user avatar
1 vote
1 answer
540 views

500 error page with no information in production.log

I am currently encountering couple of issues with the a rails application deployed on Linode server. The gemfile looks like below : source 'https://rubygems.org' group :assets do gem 'sass-rails'...
Smoke's user avatar
  • 1,062
0 votes
1 answer
2k views

activeadmin custom render if

My below code ActiveAdmin.register Question do belongs_to :topic, :optional => true controller do def index @topic = Topic.find_by_id params[:topic_id] if @topic @...
Amol Pujari's user avatar
  • 2,348
42 votes
6 answers
35k views

How to get ActiveAdmin to work with Strong Parameters?

Update: this question was asked before there was a solution for it already in ActiveAdmin. As Joseph states, the ActiveAdmin documentation now contains this information, but the answers here are ...
Gary S. Weaver's user avatar