activeadmin

Can't create new user with ActiveAdmin

↘锁芯ラ 提交于 2020-01-10 04:39:06
问题 I just added active admin to my rails app and I'm unable to create a new user. I am using the user model that active admin creates with a few added columns like first and last name. When I fill out the form for a new user and click create new user, that page refreshes but doesn't save my user and doesn't go to the recap page with the successful message. here is my AdminUser model class AdminUser < ActiveRecord::Base devise :database_authenticatable, :recoverable, :rememberable, :trackable,

Active Admin Rails 4 inline form

对着背影说爱祢 提交于 2020-01-03 19:56:58
问题 I am using on Rails 4 ActiveAdmin and Money-Rails. Is there a way to have two or more inputs in a single line of text? para "Please enter the amount" f.input :amount_due_currency, :label => "Dollars ",:input_html => {:style => 'width:3%'} para "and" f.input :amount_due_cents, :label => "cents ", :input_html => {:style => 'width:10%'} para "to deposit on your account." the output that I need would look like Please enter the amount __ Dollars and __ cents to deposit on your account. I tried

ActiveAdmin how to add a custom controller without model [duplicate]

独自空忆成欢 提交于 2020-01-03 14:48:33
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Add page to active admin I currently looking to a solution for adding a controller without a model to the admin generate by ActiveAdmin (and Rails 3.1). Of course I'd like to add a new menu in the navbar. Using ActiveAdmin.register MyControllerWithoutModel do isn't working. Edit : This question is a duplicate of Add page to active admin but no answer found. 回答1: This is what worked for me, just substitute the

Active Admin and the Apartment Gem

*爱你&永不变心* 提交于 2020-01-02 07:04:49
问题 I am new to Active Admin but from what I have seen so far I think this is quite easy to implement. I have an app with the apartment gem to add multi-tenancy. I am adding active admin to my app. Apartment uses PostgreSQL schemas to segregate data. So for example by default your models in Apartment have a 'public' tenant unless you call something like Apartment::Tenant.switch!('abc') . In my app my User and Company model are in the public tenant and everything else is in tenants. So out of the

Active Admin view to PDF

萝らか妹 提交于 2020-01-01 10:12:59
问题 I'm starting to develop in Ruby on Rails recently, therefore I consider myself beginner. I'm testing the Active Admin gem ( http://activeadmin.info/ ) and I found a problem when export a view to PDF. In the official documentation says how to customize the download links (http://activeadmin.info/docs/3-index-pages.html, it is at the end of the document) but does not work for me. When I put the following line of code: Mymodel ActiveAdmin.register do index: download_links => [: pdf] end The

ActiveAdmin with CanCanAdapter causing infinite redirect on dashboard

人走茶凉 提交于 2020-01-01 05:18:50
问题 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 continues this forever. 回答1: If the user does not have access to a page, ActiveAdmin redirects to the Dashboard. If the user doesn't have access to the dashboard, this results in an infinite redirect. Solution is to give the user the ability to read the dashboard page. Place this in the ability model

Active Admin Ruby on rails Dashboard Controller Error

坚强是说给别人听的谎言 提交于 2019-12-31 10:47:38
问题 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 error which occuring when trying to run localhost:3000: Started GET "/" for 127.0.0.1 at 2013-04-04 18:59:21 +0100 ActionController::RoutingError (uninitialized constant DashboardController): activesupport (3.2.0) lib/active_support/inflector

ActiveAdmin: batch select all pages

≯℡__Kan透↙ 提交于 2019-12-31 06:54:09
问题 Using activeadmin, is it possible to perform a batch action on ALL records of a particular Model, instead of the ones just selected on the current page? 回答1: The default batch actions operate only on the selection from the current page. You'll have to define your own batch action that just ignores the selection and does the operation on all the records. See http://activeadmin.info/docs/9-batch-actions.html for details - you need to add something like this: ActiveAdmin.register MyModel do

How to get Active Admin to work with Pundit after login

爱⌒轻易说出口 提交于 2019-12-30 09:47:09
问题 I've added the configuration pundit addapter authorization to my application config.authorization_adapter = ActiveAdmin::PunditAdapter When I login with the admin@example.com credentials I'm getting this error. Pundit::NotDefinedError in Admin::Dashboard#index unable to find policy AdminUserPolicy Extracted source (around line #2): insert_tag active_admin_application.view_factory["page"] so I created these files in my policies/active_admin folder adminuser_policy.rb module ActiveAdmin class

rails 3.1: how override inherited_resources and permit rails scaffolding to work normally again?

ぐ巨炮叔叔 提交于 2019-12-30 02:17:25
问题 SOLUTION FOUND: See comment Building a new rails 3.1 app. Started with a basic blog_entries model to get the hang of it. No surprises. Then I added ActiveAdmin, got that working okay with my existing model. But now when I try to scaffold a new model/etc with this: rails g scaffold Community name:string guid:string everything seems right (views, migration) except the controller does not have CRUD options and looks like this: class CommunitiesController < InheritedResources::Base end The