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.

activeadmin
Filter by
Sorted by
Tagged with
1 vote
0 answers
78 views

How to use a scope to show all items above average for a particular attribute

I need to create a scope to show items with a interest greater than the the average of interest for the company they belong to. There is one model with products in it. Each product has the attributes ...
bnussey's user avatar
  • 1,924
3 votes
3 answers
3k views

ActiveAdmin allow users to set per_page value in index

The ActiveAdmin docs explain how to disable pagination and set the number of records per page in a Resource index using config.per_page, but I'm wondering if there is a built-in way to allow users to ...
sixty4bit's user avatar
  • 7,718
1 vote
1 answer
2k views

activeadmin: nested resources belongs_to

I need to make nested resources in activeadmin like http://localhost:3000/admin/companies/1/admin_documents I tried ActiveAdmin.register AdminDocument do belongs_to :company end But there is ...
Pavel's user avatar
  • 1,964
0 votes
1 answer
1k views

ActiveAdmin modify existing controller action

In ActiveAdmin I am trying to edit instance variables in the show view. I have tried to do this with the following code per the ActiveAdmin docs: #admin/job.rb ActiveAdmin.register Job do ... ...
sixty4bit's user avatar
  • 7,718
0 votes
1 answer
442 views

Row level caching with "Index as Table"

I am displaying a table with ActiveAdmin using the "Index as Table" functionality: index :pagination_total => false do if Ability.new(current_user).can? :manage, :metric ...
Jeff Paquette's user avatar
1 vote
1 answer
241 views

Mongoid records embedded in resource in active admin are not displayed

I have the following models class User::ActiveAdmin::Partner < User::ActiveAdmin::Base embeds_many :bonuses, class_name: 'User::Bonus' end and class User::Bonus include Mongoid::Document ...
Mitchenko Dmitry's user avatar
0 votes
0 answers
383 views

Rails activeadmin/carrierwave has_many photos relationship throwing mass-assignment exception

I have a model BlogPost defined as class BlogPost < ActiveRecord::Base attr_accessible :title, :body, :photo, :photos_attributes, as: :admin has_many :photos, class_name: 'BlogPhoto', ...
Adam Bronfin's user avatar
  • 1,269
0 votes
1 answer
135 views

How do I limit the creation of new users to specified administrators on ActiveAdmin (Prevent users from creating more users)

We'd like all users to be able to access ActiveAdmin, however, we would like to limit the creation of new users to specified administrators. The ideal outcome would be that only administrators see the ...
bnussey's user avatar
  • 1,924
0 votes
1 answer
1k views

Polymorphic Relationship: Routes & Activeadmin

I'm trying to figure out polymorphic relationships and I keep getting the following errors with my routes whenever I try to add an index to show all + with activeadmin. Error 1: I have tried ...
phattiyo's user avatar
1 vote
1 answer
403 views

Activeadmin RecordNotFound

After setting up the friendly_id gem, I've faced a problem with the activeadmin gem, whereby it throws RecordNotFound whenever I'm trying to update, delete or create Posts using admin panel. Here is ...
user3663497's user avatar
0 votes
1 answer
1k views

ActiveAdmin manage abilities of custom member_action with cancan

I'm working on a rails project with ActiveAdmin, Devise and CanCan. What I want do is checking ability of custom member_action with cancan. Like this def initialize(admin_user) can :read, ModelA ...
Mochimazui's user avatar
0 votes
1 answer
537 views

ActiveAdmin makes submission blank

Good time, overflowers! I have an issue with the ActiveAdmin post submissiom. Here, below is the code from app/admin/posts.rb: ActiveAdmin.register Post do index do column :title column :...
user3663497's user avatar
0 votes
1 answer
86 views

Rails resource is being created successfully through activeadmin, yet the new or create action is not defined in controller

I have a rails project I've inherited and there exists a resource Lessons that is defined in ActiveAdmin where I am able to create a new lesson without a problem. However, the respective controller ...
Adam Bronfin's user avatar
  • 1,269
0 votes
2 answers
271 views

Calculate average conditionally based on an attribute

I have a requirement where I need to calculate the average of units sold for a product based on the company they were sold at. From there I will calculate the percentage difference to unit sold. There ...
bnussey's user avatar
  • 1,924
9 votes
2 answers
3k views

Rails direct upload to Amazon S3 using Activeadmin + Paperclip

I am using Activeadmin and Paperclip to make images upload on my Rails app. When I try to upload big files to S3 the timeout error occurs, so I have to implement the direct upload to S3. Does anyone ...
Henrique Amaral's user avatar
1 vote
0 answers
764 views

ActiveAdmin with two Polymorphic associations not filtering properly

We have a Photo model that is associated with a Tag model. The tag model is a polymorphic table that can be either a Sport or a Place. I've setup two has many through associations for Sport and Place ...
avian's user avatar
  • 1,723
1 vote
1 answer
2k views

How to create a dynamically populated select (drop down) filter with ActiveAdmin (Formtastic)

I'm working on a web application based on Active Admin and am trying to understand how to create a select filter that is dynamically populated with all the unique values from a particular field. From ...
bnussey's user avatar
  • 1,924
2 votes
1 answer
1k views

Display data from two or more models (with same data structure) in Active Admin

We are building an application with Active Admin and Rails. It has a series of models that all have the same data structure. We'd now like a view that displays all the data from these models ...
bnussey's user avatar
  • 1,924
2 votes
3 answers
4k views

Can't login to ActiveAdmin

I'm facing issues logging in to ActiveAdmin. Using solutions from Can't log into Active Admin. Any way to create an admin user? and Cant login to Active Admin, I tried running the following in ...
Newtt's user avatar
  • 6,120
1 vote
1 answer
71 views

ActiveAdmin: Child object claims to not have method parent_object_id

I have solved this issue before but the solution currently escapes me. I have two Models FlsCenter and Airport. FlsCenters has_many airports. In active admin I am creating a newe Airport object. ...
Thalatta's user avatar
  • 4,540
10 votes
3 answers
18k views

ActiveAdmin :select drop-down defaults to current value in development but defaults to blank in production

I have the following ActiveAdmin form: form do |f| f.inputs "Timesheet Details" do f.input :jobs_assigned_worker, :label => "Worker", as: :select, collection: Worker.all f.input :...
sixty4bit's user avatar
  • 7,718
0 votes
0 answers
631 views

Rails ActiveAdmin new resource form for object with many-to-many relationship

I have a many-to-many relationship set up between blog posts and blog categories using the has_many :through relationship and I am having trouble creating a blog post resource through active admin. ...
Adam Bronfin's user avatar
  • 1,269
2 votes
1 answer
482 views

Active Admin Index Page sorting without a column

The relevant data consists of Venue, Match and Broadcast which is a join table and more for the first two. In my Venue index page I am showing the number of Broadcasts that that venue is showing. I ...
Karthik T's user avatar
  • 31.7k
0 votes
1 answer
352 views

ActiveAdmin :date_range filter type causes undefined_method error (MetaSearch)

I am implementing ActiveAdmin and would like to use the :date_range filter type on my Job table's date column. According to the documentation this just needs to be set as filter [:attr], :as => :...
sixty4bit's user avatar
  • 7,718
3 votes
1 answer
4k views

Rails ActiveAdmin form for many-to-many relationship through a join table not working

I have in my Rails application BlogPosts and BlogCategories, and a BlogPostCategorization table to join them together. So class BlogCategory < ActiveRecord::Base attr_accessible :name, :...
Adam Bronfin's user avatar
  • 1,269
2 votes
1 answer
2k views

how to set before filter to index action in active admin?

I want to display something before a particular page loading.(Like a flash message after checking some condition). I am using active admin. How can i do this? ActiveAdmin.register User do config....
Kavitha Velayutham's user avatar
0 votes
0 answers
155 views

Is it possible to customize query made by active admin route?

I am having an issue with ActiveAdmin with the ability to enable and disable an "active" attribute on a resource. The objective is to have an enable/disable column that contains a icon link to do the ...
user2059807's user avatar
2 votes
1 answer
228 views

ActiveAdmin export columns for all formats?

What's the syntax to export the same columns in a single configuration to CSV and JSON for instance, e.g. the CSV configuration: csv do column :id column "Person" do |relation| ...
Ain Tohvri's user avatar
  • 3,007
1 vote
1 answer
654 views

Active Admin Namespaced Model Form

I am having issues with AA (1.0.0pre) and Rails 4.1.3. I have a namespaced model: Surveyor::Survey for which I want an admin form for. But the name attributes of the inputs does not reflect the ...
jwilcox09's user avatar
  • 721
3 votes
1 answer
3k views

Active Admin Permitted Params

Is there a way to tell whether I am in create or edit mode from inside the permit_params block of active admin? I'd like to merge created_by and updated_by when I'd creating a new record. When I'm ...
Dan's user avatar
  • 1,258
0 votes
4 answers
1k views

Friendly_id and Active Admin conflict - possibly because of revert_freindly_id

first time asking a question on stack overflow :) I'm having a conflict between friendly_id and active admin (it's an assumption), as discussed in many threads here. I've looked at all those threads, ...
harini's user avatar
  • 21
1 vote
2 answers
1k views

ActiveAdmin set up for resource, but won't create new item through custom form

I have ActiveAdmin setup in my rails application version 3.2 where I have a BlogPost model set up perfectly fine so I can view index without an issue. But when I create a new blogpost like ...
Adam Bronfin's user avatar
  • 1,269
2 votes
1 answer
673 views

How would I add a fieldset to a resource in ActiveAdmin that does not correspond to a column?

I would like to be able to add a field to a registered model in ActiveAdmin that does not correspond to a column on the model's table. The model's table looks something like this: | id | remote_id | ...
user2059807's user avatar
3 votes
2 answers
19k views

How to prefill ActiveAdmin form value from another model?

In the following code, how does one populate a prefilled form field with a value from another model into the ActiveAdmin form: ActiveAdmin.register Person do index do column :forename ...
Ain Tohvri's user avatar
  • 3,007
0 votes
1 answer
526 views

Ruby on rails 4, Active admin customize devise signup

I am using ruby on rails 4 and installed Activeadmin gem, it automatically installed devise gem and now i am able to sign up for normal users beside having the activeadmin panel and users, The problem ...
Tarek Abouzeid's user avatar
1 vote
3 answers
4k views

Can I customize the delete warning in ActiveAdmin

It's common in Rails apps to have the Destroy action come along with a warning - "Are you sure you want to delete this?" The typical code looks like this: link_to("Destroy", "http://www.example.com", ...
pjmorse's user avatar
  • 9,284
1 vote
1 answer
2k views

How to Customize the Filter in activeadmin

I want to customize my filter in activeadmin panel for applications panel. currently i have a filter like this. and want the filter like this i do the code for this as follow For add category ...
hgsongra's user avatar
  • 1,454
0 votes
1 answer
475 views

Statistics of database entries in rails

I am wondering if there is any pre written gem for rails 4 project which shows the analytics on database (model) for e.g how many order received today? yesterday? last month?. How many users created ...
Bhushan Lodha's user avatar
0 votes
1 answer
48 views

Active Admin password format

How can I change the password format in active admin? I am creating users from the interface and I don't want to use camelcases and numbers for the password format. Can I do this from inside the ...
Bogdan Popa's user avatar
  • 1,099
1 vote
1 answer
698 views

ActiveAdmin comments on custom action

I have a custom admin page that I'm rendering through a member_action endpoint. I am trying to figure out how to render the active admin comments panel for the resource on that page. Is there a ...
Craig Kochis's user avatar
0 votes
1 answer
467 views

TinyMCE with active admin doesnt load in production with rails

I have everything working in development, but I just pushed to production and the tinyMCE toolbar isn't loading. I am getting the following error. GET https://www.luminoto.com/javascripts/...
vanilla_skies's user avatar
2 votes
2 answers
855 views

Prevent ActiveAdmin Logins with Pundit Policy

I have ActiveAdmin and Pundit setup and working. My User model has a role attribute (rails 4.1 enum). How can I only allow a user with the admin role to log into /admin?
KPheasey's user avatar
  • 1,775
0 votes
1 answer
524 views

ActiveAdmin add button "previous"

I am trying to add two button "previous", "next" to ActiveAdmin show page. action_item only:[:show] do |recipe| link_to "Previous", admin_recipe_path(Recipe.where(["id > ?", recipe.id]).first) ...
user3916770's user avatar
2 votes
1 answer
2k views

ActiveAdmin edit multiple models in the same custom form loaded from a partial

I have this scenario that I can't figure out how to make it work. I have a Setting model. The model has two fields, key and value. So for each new setting I need to add to my rails app I just create a ...
Andres's user avatar
  • 11.6k
0 votes
2 answers
1k views

ActiveAdmin, CanCan: privelegies

I'm trying to set permissions for active_admin admins in my app. I want to separate admins for Administrators with full privilegies and Moderators who couldn't edit and destroy objects in ActiveAdmin ...
Pavel's user avatar
  • 1,964
6 votes
3 answers
2k views

activeadmin, remove empty message

In ActiveAdmin, when there are no items for the model (in my example User), it shows a default 'There are no Users yet. Create one'. How can I remove this message? Is there the possibility of ...
AgostinoX's user avatar
  • 7,583
0 votes
1 answer
800 views

add scope to form select in active_admin

I have a select field in an active_admin form which is an associated activerecord relation Travel and I would only like the travels to appear that have a status = "active". Any idea how I can create a ...
monty_lennie's user avatar
  • 3,111
1 vote
1 answer
534 views

Issue with using the number_to_currency helper with pounds format

I am trying to leverage the number_to_currency helper on my ActiveAdmin application to show an amount in pounds. I have tried the following code and it's throwing an error. column "GBP", :sortable =&...
bnussey's user avatar
  • 1,924
0 votes
1 answer
126 views

Duplicate form fields for has many leads to blank parameters and errors

I have the following inputs in active-admin f.inputs 'Programme description' do f.input :nationalities, as: :select, hint: 'Nationalität des Suchenden', collection: all_countries, ...
Besi's user avatar
  • 22.8k
2 votes
5 answers
2k views

active admin conditionally show csv link

I'm using rails 3.2 with active admin 6.0 and I have different roles for active admin users, admins and agents but I don't want agents to be able to export the data, csv. how can I hide all download ...
monty_lennie's user avatar
  • 3,111

1
39 40
41
42 43
73