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
1
vote
0 answers

Read only resource build with administrate gem

Is it possible to create only index and show actions? Tried removing from config/routes.rb but got just errors.
Tolik Kukul
  • 1,996
  • 16
  • 26
0
votes
1 answer

RailsAdmin Gem - Customize multi-select dropdown with conditional values only

We have implemented gem 'rails_admin', '~> 1.4.3' in our application. The issue we are facing here is in customizing the output values in the multi-select dropdown in rails admin. For example: Student has many Teachers. So while creating a Student…
0
votes
0 answers

Administarte gem custom getter and setter

I want to convert dollars to cents without using money gem and outside the model. This attribute belongs to model that is has a dashboard in Administrate gem. When users input 10 it should be converted to cents as 10 * 100 and saved to DB. I was…
0
votes
2 answers

How to use subdomain with Rails_admin on rails

I have rails admin with my application and when i try to access rails_admin by entering localhost:3000/admin it generates the followibg routing error Routing Error No route matches [GET] "/users/sign_in" my device routes on routes.rb is require…
0
votes
0 answers

Rails Administrate: Type not being set in many-to-many polymorphic association

I have a model Medium which through STI has two subclasses class Medium < ApplicationRecord end class Image < Medium end class Video < Medium end These two subclasses can through a many-to-many relationship be associated with instances of a…
migu
  • 4,236
  • 5
  • 39
  • 60
0
votes
1 answer

Best way to do CSV seed file upload to rails repo through administrate?

The main table in my backend gets populated by a CSV file. When seeding and running rails db:seed , the CSV files in lib/assets/csv is read with file = File.read(Rails.root.join('lib', 'assets', 'csv', 'data.csv'), and the logic in seeds.rb runs…
Erocknine
  • 21
  • 2
0
votes
1 answer

rails - administrate + devise creating new users goes to devise controller

I am working on a rails application using rails administrate. I have an admin interface with a resource called admin_users that is controlled by devise. Right now, users are really only made in the rails console, and devise was added to allow an…
James N
  • 523
  • 1
  • 8
  • 30
0
votes
1 answer

Ruby On Rails: Making a Home Page with Administrate

I'm using the Administrate gem to set up my Admin page. I have successfully done so and generated this Admin Page: Admin Page Now I want to create a Home Page that my login page will redirect to after users successfully logged in. How can I do that?…
James
  • 1
  • 1
0
votes
4 answers

Administrate Gem does not yet support namespaced models

Am working on a Modular Rails Application by following TutsPlus Modular Rails App training here. However, after install Administrate Gem and running rails generate administrate:install to install my dashboard, I get the error as is in the image…
Afolabi Olaoluwa
  • 1,898
  • 3
  • 16
  • 37
0
votes
2 answers

jQuery is not defined,$ is not defined,Rails is not defined in windows 10

When I load localhost:3000/admin I keep getting this message in the Chrome dev tools, and my RailsAdmin is then broken without jQuery I am getting an error in my console 'JQuery is not defined' '$ is not defined' 'Rails admin is not defined'. gem…
0
votes
3 answers

Rails Administrate sets presence validation by default

I have an admin interface built with Rails Administrate gem. It's getting pretty annoying because it sets a presence validation on the belongs_to model. Location.validators_on(:parent) =>…
Bogdan Popa
  • 1,099
  • 1
  • 16
  • 37
0
votes
2 answers

Administrate and unscoping default scope

I have a model with a default scope: default_scope -> { where(is_active: true) } Can I unscope the model in Administrate, so the I can see all the records in the admin panel?
pmichna
  • 4,800
  • 13
  • 53
  • 90
-2
votes
2 answers

rails_admin change boolean default icon true and false instead string 'true' and 'false'

enter image description here I did created on one model with boolean field rails g model saas reserved_seat:boolean when i add new record it will show only ✓ , ✘ and ‒ enter image description here Instead i need to value display neither 'true' or…
1
2