Questions tagged [administrate]

The Administrate gem is a library created by Thoughtbot for creating flexible, powerful admin dashboards in Rails.

47 questions
0
votes
1 answer

Search by id in Administrate Gem in Rails

By default Administrate Gem gives us a feature where we can search record by name. But now I am trying to search record by ID in search bar of admin Dashboard, like this ATTRIBUTE_TYPES = { id: Field::Number, name: Field::String, }.freeze But I…
0
votes
0 answers

Can´t change password in Administrate or Madmin. Rails 7 + Devise

Try installing administrate(thoughtbot) and Madmin(GoRails). But in both cases when I change the password of a user in /admin or /madmin and try to login again with the new password, I get the following error. raise Errors::InvalidHash.new("invalid…
Poluxland
  • 53
  • 7
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
1 answer

Rails Administrate - How to Customize Navigation Link Text

In administrate if I have a model called parentequipmenttype how to I customize the Navigation link to display as "Parent Equipment Type" instead of listing as parentequipmenttype?
spacerobot
  • 265
  • 1
  • 5
  • 23
0
votes
1 answer

How to drastically customise Rails Administrate gem

Firstly, my apologies if this question has already been answered elsewhere, but I could not find a single post that is related to this. Please redirect me to the answer if one already exists. Now, I'm pretty new to Ruby/Rails web development and…
0
votes
1 answer

Filtering belongs_to drop-down in administrate dashboard

I have an administrate dashboard in a Rails (6.1.5) that allows administrators to add shortlisters and assign them an allocation of projects. Projects are in events. The drop-down by which an event is added when creating a shortlister comes from…
dumbledad
  • 16,305
  • 23
  • 120
  • 273
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

Rails Administrate : how to change interface language

I'm using Thoughtbot's Administrate library for the first time, everything is bright and shiny, but I can't find anything on the docs about translation. From what I found in the changelog, the library is supposed to have several i18n translations…
Ruff9
  • 1,163
  • 15
  • 34
0
votes
1 answer

administrate gem deprecations on relations with class names

A model Transaction belongs_to :consumer, class_name: 'User' The administrate gem automatically picks up this relation and includes both the model relation and the id ATTRIBUTE_TYPES = { user: Field::BelongsTo, consumer:…
Jerome
  • 5,583
  • 3
  • 33
  • 76
0
votes
1 answer

administrate gem customizing labels used for resources in dashboard collections

The administrate gem guide indicates the labels for ressources can be adapted to attributes of that model def display_resource(user) user.name end However this does not appear to function on relations Card belongs_to User and the goal is to…
Jerome
  • 5,583
  • 3
  • 33
  • 76
0
votes
1 answer

How do I relate Ancestry gem data in Administrate gem

I'm using the Administrate gem in my Rails 6 application. I have created a category model and I'm using the ancestry gem to organise the tree structure etc. I'm having trouble trying to integrate the ancestry gem into Administrate. Mainly an issue…
Bradley
  • 922
  • 2
  • 8
  • 24
0
votes
0 answers

How to set OFFSET to 0 in Rails Administrate? My default is 475

I'm trying to setup Rails Administrate - https://github.com/thoughtbot/administrate. Following the docs: gem "administrate" in the Gemfile rails generate administrate:install "Restart your server, and visit http://localhost:3000/admin to see your…
HJW
  • 342
  • 3
  • 13
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

Monday as first day of week in the datepicker provided by the Administrate Rails engine

I am learning to use Thoughtbot’s Administrate engine as an admin dashboard generator. In order to customize the date/time picker that the library uses within forms by default, I generated the corresponding partial, which contained this line: <%=…
Giuseppe
  • 5,188
  • 4
  • 40
  • 37
0
votes
1 answer

include_blank: false not working in administrate gem

I've generated the _form.html.erb view in Fields::Belongs_to to customize the select element but I can't seem to make include_blank: false to work. Here is my code. I've already search on the correct syntax of using include_blank in select…
brynmrk
  • 23
  • 1
  • 4