Questions tagged [rails-admin]

Rails Admin is a simple CRUD engine for managing data. It was originally ported from MerbAdmin to Rails 3 and has been expanded since.

rails-admin
Filter by
Sorted by
Tagged with
1 vote
1 answer
254 views

How can i authenticate the model in rails admin based on the user's role?

I have a Organization model and i want to authenticate it based on the role of the user i.e. admin and superadmin. When i am logged in as admin there should not be Organization model on the list and ...
Sumin James's user avatar
0 votes
1 answer
146 views

rails-settings is not working with rails_admin while deleting a user

The issue is already been created on git here when we delete a user we get error here are logs Started GET "/admin/user/552/delete?_pjax=%5Bdata-pjax-container%5D" for 127.0.0.1 at 2019-12-05 11:41:...
Asnad Atta's user avatar
  • 3,933
2 votes
1 answer
390 views

In Rails Admin, I need help to limit the number of rows in Dashboard for History_Index Action

I'm using Rails_admin together with Papertrail. Because I inserted the "History_Index" action, in "config.actions", like below: history_index do only PAPER_TRAIL_AUDIT_MODEL end #This is showing ...
Bruno Campana's user avatar
0 votes
2 answers
1k views

Rails admin tables with read only access

I am using rails server with rails_admin I want to add a table to my include_models but I don't want to let write access to one/few of the models: My admin looks like this: # frozen_string_literal:...
Ehud Lev's user avatar
  • 2,691
1 vote
0 answers
428 views

Setting up rails_admin with Pundit 2 - do I need the rails_admin_pundit gem? How to do without?

I'm introducing the RailsAdmin gem in my app. I already use Pundit 2 for authorization. I'd like to use Pundit to deal with authorization – for now, simply give every admin the access to RailsAdmin, ...
vindve's user avatar
  • 23
0 votes
1 answer
955 views

How to remove Rails-Admin

I thought I've removed Rails-Admin from my app. However, when I push my app to Heroku,the error occurres about Rails-Admin and failed to push. here's the way I tried: 1.remove Rails-Admin from ...
sooryung lee's user avatar
0 votes
0 answers
614 views

bundle exec rake assets:precompile take incredible time with docker and rails_admin

How to speed up the rake assets process (rake assets:precompile) when building a docker rails image with rails_admin ? Issue : I'm trying to build a docker image of a rails application (below the ...
Houssem Fathallah's user avatar
1 vote
2 answers
2k views

You are not authorized to access this page. while trying to connect with an admin employee

Everytime i try to connect to my backoffice with an admin, I get this You are not authorized to access this page. even tho everything is setup to be supposed to accept admins. I've checked and all my ...
Toma's user avatar
  • 23
0 votes
0 answers
206 views

Rails_admin deleting few items in one click

Is it possible to delete a few items with one click? I have installed rails_admin for my site. When i view list of some items, for example "users" i could select a few of them with selectbox in left ...
web-wolf's user avatar
1 vote
2 answers
2k views

rails_admin won't let me keep my enum field as nil

Model: class Reservation < ApplicationRecord # https://naturaily.com/blog/ruby-on-rails-enum enum recurrence: { daily: 0, weekly: 1, monthly: 2, annually: 3 }, _prefix: :...
Chiperific's user avatar
  • 4,598
0 votes
0 answers
80 views

Rails admin gem co-related dropdown is not working

I'm using rails_admin gem for my application, i have 2 models state and substate, State has many sub state and substate belongs to particular state, for this i need co-related dropdown. I have tried ...
GPks's user avatar
  • 136
0 votes
1 answer
279 views

RailsAdmin Carrierwave Multiple Upload undefined method `filename' for nil:NilClass

Following Carrierwave and RailsAdmin instructions I can preform multiple uploads in RailsAdmin with Carrierwave, using aws S3. When trying to delete one of the images I get: undefined method '...
Remington Charles's user avatar
2 votes
2 answers
465 views

How to display image returned from Mongoid::GridFs

I'm trying to display my image saved in Mongo in the record row with the rails_admin gem. I have my model saving, and my image saving, and I'm saving the image ID in the model record. Here's my ...
Daniel Lawton's user avatar
0 votes
1 answer
121 views

How to save rails_admin record to mongoid

I am struggling with understanding how to save a model to MongoDB using mongoid and rails_admin. I've got my model: class PictureAsset < ActiveRecord::Base include Mongoid::Document field :...
Daniel Lawton's user avatar
0 votes
0 answers
257 views

Undefined method `belongs_to' when accessing new custom action

I've added a new custom action to XslStylesheet, however when I try to access this, I get the following error: undefined method `belongs_to' for #<RailsAdmin::AbstractModel:0x14fb614d> I have ...
Daniel Lawton's user avatar
5 votes
1 answer
2k views

How do I create a custom bulk action in Rails Admin?

The base question of "how to create a custom bulk action in Rails Admin" has been asked multiple times in the project, and even referred here to be asked, but has never been done here: "Looking for ...
streetlogics's user avatar
  • 4,690
0 votes
0 answers
342 views

Debug RailsAdmin error which causes transaction rollback

I'm trying to solve a current issue on my rails app. My rails app is using RailsAdmin and I have an issue after trying to upload files via generic RailsAdmin options. So this app is using Ruby 2.5.3, ...
Tunnelblick's user avatar
0 votes
1 answer
422 views

How do I hide a particular type of user in rails_admin?

I am using Rails Admin gem as an admin dashboard in my rails app, it works perfectly and shows all my models. Am using devise for authentication and have two types of users, Users that signup and ...
peter's user avatar
  • 45
1 vote
1 answer
200 views

Rails admin cascading dropdown how to?

As you see in image below after selection of product attribute i want to filter the options based on the selected attribute_id this is in rails_admin
Peter Van de Put's user avatar
0 votes
0 answers
182 views

How to configure side menu in rails admin

i'm using rails admin and the sidemenu i'd like to tweak into sections. Following the docu, the section can be done with a navigation label on a model and the subs with a parent relation. however i ...
Peter Van de Put's user avatar
1 vote
1 answer
86 views

Hide devise Guest users in rails admin

In my rails app am using Devise for authentication and using Rails Admin as an admin dashboard. To save users location without signing them in the app am using Devise's Guest User, it all works well,...
peter's user avatar
  • 45
1 vote
0 answers
101 views

I can only access rails_admin via cancancan with `can :manage, :all `

On rails 5. I'm trying to integrate cancancan 3.0.1 with rails_admin (1.4.2) and for the most part it works. My problem is that I can only get routing acccest to work if I give the user can :manage, :...
Andrew's user avatar
  • 993
1 vote
0 answers
181 views

How can I paginate a lot of nested has_many association records in rails_admin?

That's how my edit page looks like now Can I paginate nested data on the edit page? Or maybe is there a way to move options to a new section with their own CRUD and pagination (e.g. /categories/1/...
Roman Slobodzyan's user avatar
2 votes
1 answer
251 views

RailsAdmin validations on foreign key crashes

Failed to replace tickets because one or more of the new records could not be saved. My Form model has_many tickets. A ticket cannot have a form if it has a particular flag set. When i go to test ...
J.R.'s user avatar
  • 5,919
0 votes
1 answer
120 views

How to pass javascript variable from Rails view to action

I have a list of user emails in a bit of Javascript code in my view that I have created for my action. The view is in haml format. I want to press a submit button on a form and access this list of ...
Daniel Lawton's user avatar
0 votes
1 answer
393 views

RailsAdmin papertrail generating empty history

In my app I have installed rails-admin-history-rollback for PaperTrail gem, the history is working, however, it's also generating empty changes. I followed the configuration and I don't know if i ...
Alan Paiva's user avatar
4 votes
1 answer
2k views

PG::UndefinedTable: ERROR: relation "action_text_rich_texts" does not exist | Rails 6 | Rails_Admin | Postgresql

I've setup Rails API only project with Postgreqsl database. Rails Version: 6.0.0.rc1 Rails_Admin Version: 2.0.0.beta I am getting following error ActiveRecord::StatementInvalid in RailsAdmin::...
Kaleem Ullah's user avatar
  • 6,909
1 vote
2 answers
435 views

How to get Rails Admin date filters to follow the Rails app's timezone?

I have a Rails app and use Rails Admin for back-office. I have my app's timezone set to 'Melbourne' but its Date filters only show results in UTC. How can I change this behaviour to follow the app's ...
Vanessa Espirito Santo's user avatar
2 votes
1 answer
3k views

Rails Admin with Devise Admin user not working for API only app

I have an API only rails app, with Devise for user management and doorkeeper for token authorization from the Mobile App. This works fine. I also installed Rails Admin, to manage all of the back end ...
Hector Toro's user avatar
0 votes
0 answers
118 views

RailsAdmin doesn't run callbacks in production environment

I have a RailsApp with RailsAdmin running and I have a model with some callbacks defined. In the development environment RailsAdmin runs these callbacks, but not on production. The code is the same, ...
hoffl's user avatar
  • 1
0 votes
1 answer
541 views

Which is the best use of discard (or act_as_paranoid) in rails-admin?

I'm using the gem discard and also rails-admin. I would like to know which is the best approach to list my active users in a shop in rails admin, taking into consideration the users kept I've created ...
Juanfra Magrini's user avatar
0 votes
1 answer
1k views

Previewing Video attachement Rails Admin, Active Storage

I am using ActiveStorage 5.2.3. I have one_attachment and multiple attachments relations in the same model. class Post < ApplicationRecord has_one_attached :image has_many_attached :photos ...
Montells's user avatar
  • 6,499
0 votes
1 answer
952 views

How to make customisation drop-down in Rails Admin associations model

Rails Admin has_many associations option drop customization I want to make some changes in rails admin select drop-down option. I have some models with has_many relationship. Model Files post.rb ...
Praveen Kumar's user avatar
1 vote
2 answers
793 views

Rails Admin not authenticating with Cancancan or Devise

I tried this in the config: ### Popular gems integration config.authenticate_with do warden.authenticate! scope: :user end config.current_user_method(&:current_user) here, accessing /...
quantumpotato's user avatar
3 votes
1 answer
2k views

How to display a virtual attribute in a Rails Admin edit form

I have users and sites with a has_many through relationship (SiteUser is the lookup table, upon which some role logic and invite logic hinges). I am using Devise Invitable to allow site owners to ...
pixelcandy's user avatar
0 votes
0 answers
58 views

Data matrix in Rails admin between two models

I need a matrix between two models. Grade Model name Student model name gradeId Course model name gradeId Score model courseId studentId note1 note2 note3 ...
Nicolás A. Rodríguez's user avatar
-1 votes
1 answer
200 views

Rails_admin returns 500 on Heroku

I'm using rails 5.1, ruby 2.3.3, rails_admin '~> 1.4', '>= 1.4.2' Whiles everything is working as supposed in development environment, when I push my code to Heroku and go to /admin I get: We're ...
bottles's user avatar
  • 27
0 votes
0 answers
102 views

Rails Admin Home Button Messing up with my main page

I have tried looking for an answer online regarding this but I can't seem to find any solution. I am using the rails_admin gem in my rails application. Everything seems to work fine but when I click ...
Usman Ijaz's user avatar
0 votes
1 answer
444 views

RailsAdmin - Export Action

Recently I started using Rails Admin for creating admin panel. I am using devise for authentication. I need to access current_user in export action. For virtual attributes in formatted_value block I ...
Abdülhamid's user avatar
0 votes
1 answer
608 views

Add export option to Rails Admin Custom Page

I have the following custom page in Rails Admin: require 'rails_admin/config/actions' require 'rails_admin/config/actions/base' module RailsAdminSapSaeQualifiedSearch end module RailsAdmin module ...
Mark Locklear's user avatar
0 votes
1 answer
342 views

Add simple text/description to a page in Rails Admin

Is there a way to add text to a page in rails admin? I'd like to add a description to a page. I know the label can be edited, but I'd like to be able to add a description to a page underneath the ...
Mark Locklear's user avatar
0 votes
1 answer
272 views

NoMethodError in RailsAdmin::MainController#edit

I have deposit and wallet models in my rails admin. I am using wallet in deposit model as: wal=Wallet.where(user_id: self.user_id) wal.balance = wal.balance + self.amount wal.save! Error: ...
honey's user avatar
  • 1,049
0 votes
2 answers
1k views

RailsAdmin enum display existing value of the record

I have defined a User model in which there is a classical role class User enum role:[:user, :poweruser, :admin, :superadmin] I am now using RailsAdmin to manage the fields of the user in rails_admin....
P.Bra's user avatar
  • 264
0 votes
0 answers
46 views

Working with Relationship Attributes. in association NxM rails_admin

I have a relationship between employee and sale NxM. But in the employye_sale table I have the commission attribute. The problem is that! I can not take this commission field and show it in the view. ...
Carlos Lima's user avatar
1 vote
1 answer
433 views

datetime object updated when editing in Rails Admin

So I have a Restaurant table in my PostgreSQL DB hosted on Heroku, that has among others two datetime columns: opens and closes which represent the schedule of each restaurant. I use Rails Admin ...
Uj Corb's user avatar
  • 2,059
1 vote
2 answers
2k views

Rails Admin form for has_many association

For instance say, I have an association in one of my model as: has_many :students We know rails_admin creates a multi-selection input field in the form where a user can select students. The multi-...
Aayush's user avatar
  • 165
0 votes
0 answers
128 views

Rails Admin and dealing with Calculated Totals,Subtotals and Discount fields

Ok so I have a table orders, order_items, and items. Everything works fine except for 1 thing. class CreateOrders < ActiveRecord::Migration[5.0] def change create_table :orders ...
The Gugaru's user avatar
1 vote
1 answer
1k views

rails admin - Rendering a table inside a model show action

By default, rails_admin shows the :name or :title of an associated model list. Is there a way to render a table similar to the one shown in 'list' action of the associated model ?
Chen Kinnrot's user avatar
  • 20.7k
0 votes
1 answer
146 views

Rails_admin Error After upgrading from 0.6.3 to 1.4 instance variable name not allowed

Error: `@charged?_registered' is not allowed as an instance variable name I'm receiving this error after upgrading rails admin to the latest version, it was running fine before. It shows me the error ...
Ronnie Wiesenhower's user avatar
1 vote
1 answer
709 views

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 < ...
Jack Sengar's user avatar

1 2
3
4 5
20