All Questions
Tagged with activeadmin ruby-on-rails-3.2
64 questions
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 ...
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?
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 ...
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... ...
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
...
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....
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 ...
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, :...
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 ...
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 ...
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 ...
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 ...
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: ...
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 ...
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 ...
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 ...
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 ...
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 ...
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....
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 ...
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 ...
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 ...
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 :...
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 ...
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....
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|
...
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)...
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-...
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 ...
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
...
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 ...
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 ...
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.
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, ...
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 ...
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 =&...
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 ...
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 ...
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 ...
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
...
...
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 /...
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....
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
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....
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 ...
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 => ...
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 ...
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'...
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
@...
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 ...