Questions tagged [rails-administrate]

Administrate is a library for Rails apps that automatically generates admin dashboards. Administrate's admin dashboards give non-technical users clean interfaces that allow them to create, edit, search, and delete records for any model in the application.

  • Administrate solves the same problem as Rails Admin and ActiveAdmin, but aims to provide a better user experience for site admins, and to be easier for developers to customize.

  • To accomplish these goals, Administrate follows a few guiding principles:

  • No DSLs (domain-specific languages) Support the simplest use cases, and let the user override defaults with standard tools such as plain Rails controllers and views. Break up the library into core components and plugins, so each component stays small and easy to maintain.

28 questions
4
votes
1 answer

Rails Administrate: Cannot customise controller actions

I'm using Rails Administrate and want to override the new action on a controller. The documentation suggests this is straightforward. However, the application seems to ignore my override and goes straight to rendering new.html.erb instead of going…
4
votes
1 answer

Unpermitted parameter error when adding request parameter while using Administrate

I'm using Administrate v0.11.0 with search_term textbox, it works totally fine, and now I want to add a request parameter my_search_condition_flag which is a boolean flag value that affects search condition. In my index action of controller, I added…
Hirofumi Okino
  • 975
  • 1
  • 10
  • 22
4
votes
2 answers

Rails. Create Devise users directly from Administrate panel

I'm using devise to create users directly from console, in consequence not using the :registerable module. The way to create users from the console is by providing email, password and password_conformation this way: User.create(email:…
Ernesto G
  • 525
  • 6
  • 20
3
votes
1 answer

Multiple select in administrate

Since administrate does not yet have support for multiple selects. Has anyone created a custom multiple select? Preferably one that works like the HasMany select.
dan-klasson
  • 13,734
  • 14
  • 63
  • 101
2
votes
1 answer

Administrate gem does not allow to view user

A Rails 6.0 uses gem administrate. Users flagged as admin access the pages properly. The user index is displayed and, for example, the edit page is accessible: /admin/users/2579/edit but calling the same object's show page returns an…
Jerome
  • 5,583
  • 3
  • 33
  • 76
2
votes
2 answers

What is the proper way to integrate enum with administrate?

I have a rails app where the users have a gender, which is an enum, where 0 means female and 1 means male. I have this code in the user_dashboard.rb: require "administrate/base_dashboard" class UserDashboard < Administrate::BaseDashboard …
15 Volts
  • 1,946
  • 15
  • 37
2
votes
1 answer

Rails using Paranoia and Administrate, Is there a way to get deleted record with administrate for user?

I would like to get all deleted records change by paranoia on admin panel with administrate. My problem is that I'm finding a way to do this stuff but until now without success Actually what I'm trying to do is to override index method on a specific…
Snoobie
  • 760
  • 2
  • 12
  • 30
1
vote
1 answer

Passing params to another controller in Rails administrate

This would seem to be a fairly straightforward question but I couldn't seem to find anything about it in the docs. I have a model events which has_many nested performances (which has an event_id). Now I could use something…
holden
  • 13,471
  • 22
  • 98
  • 160
1
vote
1 answer

Administrate gem - how to show attribute which target model does not have as column, on index page

I'm trying to show attributes which a model does not have as column. For example, I want to show "total_salary" on user index dashboard. User model's schema is as followings, id int name string age int As above, User model does not have column…
1
vote
1 answer

Rails customizing the administrate gem

I have location, concert and artist model as class Location < ApplicationRecord has_many :concerts, dependent: :destroy has_many :artists, through: :concerts end class Concert < ApplicationRecord belongs_to :location belongs_to…
Jack Sengar
  • 341
  • 1
  • 3
  • 9
1
vote
0 answers

administrate custom action on show page

I would like to add a reinvite user button on my users show page. My reinvite button looks like this: def reinvite User.reinvite! end And the button looks like this: <%= link_to( "Reinvite User", [namespace, page.resource], …
1
vote
0 answers

Rails Administrate - Sort BelongsTo column in Collection alphabetically

I need some help, as I've spent the past couple of days digging through the repo's issues / PRs figuring out how to order a resource's belongs_to association alphabetically in its collection. Using Rails 5.0.7 and Administrate 0.10.0. In my…
1
vote
1 answer

Administrate gem STI model names not being rendered correctly

I'm having a problem with the Administrate dashboard gem and two of my models. One of the models is the default User model generated by Devise, and the other one is a simple STI model which, at the moment, doesn't have any custom functionality.…
Paul Andrei
  • 108
  • 7
1
vote
0 answers

AdminUser Error with Administrate Gem in Rails 5

I'm getting the following error message when trying to access the admin/admin_users route provided by the Administrate gem: LoadError in Admin::AdminUsersController#index. The other admin routes (i.e. Users, Topics, Posts) work fine. I haven't…
lgants
  • 3,665
  • 3
  • 22
  • 33
1
vote
1 answer

Undefined method `camelize' for nil:NilClass (NoMethodError) in Rails using Administrate framework

I am trying to use Administrate to create a customizable/flexible admin dashboard for a web app I am working on. I have followed the instructions on https://github.com/thoughtbot/administrate I keep getting this recurring error: `block in…
jshaf
  • 309
  • 1
  • 18
1
2