Skip to main content

Questions tagged [ruby-on-rails]

Ruby on Rails is an open source full-stack web application framework written in Ruby. It follows the popular MVC framework model and is known for its "convention over configuration" approach to application development.

ruby-on-rails
0 votes
0 answers
25 views

How to access associated objects in a nested form

How do I use a nested form, for an object association, but display values from both the associated object, and the object association itself? Excerpt of the nested form: <%= form_with model: @...
jmc's user avatar
  • 15
0 votes
0 answers
15 views

Rails 7.1 redirect_to(Shibboleth Logout) is not working

I am not sure how to debug Rails 7.1, redirect_to() not working vs in Rails 3.2 the same exact code works. Within Rails 3.2, I have a Controller action "logout" that contains the below and ...
Chris's user avatar
  • 403
0 votes
0 answers
23 views

Rails 7 error during application start - uninitialized constant Patches::AuthlogicPasswordPatch

I'm upgrading my rails app from 6.1 to 7.0 and i'm running into this runtime error: I do use the Authlogic gem, but the odd thing is i have no config/initializers file for Authlogic, and i can't find ...
weetch's user avatar
  • 121
0 votes
0 answers
23 views

How to automatically derive foreign key column names with polymorphic associations?

In my Ruby on Rails 7 application I have a large Account model with various has_many associations (most of them are left out for brevity here): class Account < ApplicationRecord has_one :...
Tintin81's user avatar
  • 10.1k
0 votes
0 answers
9 views

xapian-full-1.2.3 not able to install succesffully

Application not starting after ubutu patch upgrade. /home/azureuser/app2/current fatal: not a git repository (or any of the parent directories): .git fatal: not a git repository (or any of the parent ...
user3715261's user avatar
0 votes
0 answers
15 views

Implement prometheus and garafana for a ruby on rails application

I am looking for a help to implement prometheus and garafana in my rails app. I have tried using prometheus-client and yabeda-prometheus gem. I have also tried with prometheus-exporter gem but all in ...
Muhammad Ans's user avatar
0 votes
0 answers
13 views

Reload ajax datatable in rails

im using rails 7 with server-side ajax datatable. When delete a row and call reload(), it doesn't reload datatable. It used to work with rails 6. When I click on delete button, it deletes de data row ...
Juny's user avatar
  • 301
0 votes
0 answers
26 views

Rendering of select options appears correct in code, not in window

The following rails helper method aims to give a select menu with options that have the background of the value (which represents a color) def options_with_colors(colors) colors.collect do |...
Jerome's user avatar
  • 6,011
0 votes
0 answers
39 views

Ruby (3.3.4) and Rails (7.1) - rails s Zeitwerk - uninitialized constant Utils::ScriptsUtils::Utils (NameError)

I am trying to update my ruby app from ruby 2.6.6 to ruby 3.3.4 and Rail 5.1 to Rails 7.1 I know it is not a good practice to do so, but in my case (which is a bit complicated) I felt I didn't have ...
bseido's user avatar
  • 19
0 votes
0 answers
26 views

JSON serialization with a group by query ... how to?

I have an API endpoint to pull a big JSON blob from one of my models, and it works, but I'd like to improve it. The current implementation is below, and mostly just works using built in associations. ...
valenumr's user avatar
0 votes
1 answer
38 views

Rails Internationalization – Lazy Lookup with a Presenter class

4.1.4 of the Rails Guide explains "Lazy" Lookup for the Internationalization gem. As an example: en.yml en: clients: show: good_client: 5 Star Client app/views clients/show....
Dan SimBed's user avatar
0 votes
3 answers
54 views

Alternative to "pluck" for a single record

In Ruby on Rails, the array method pluck works either if the things are objects or hashes. E.g. array_of_hashes = [ { name: "Alice", age: 25 }, { name: "Bob", age: 30 }, { ...
Leticia Esperon's user avatar
0 votes
1 answer
40 views

Ruby on Rails: how to efficiently save nested attributes (recursively)?

I'm using Rails 6.1.3.2 and trying to make saving of nested attributes more efficient. The database used is MySQL. Code basis BoardSet.rb class BoardSet < ApplicationRecord has_many :boards, ...
klues's user avatar
  • 929
0 votes
1 answer
30 views

Trying to render partial but The response (500) did not contain the expected <turbo-frame id="">

Trying to learn this a bit, but keep running into new issues. Currently, I have an 'explore' button that is supposed to run some controller code, and pop out a new _partial where it counts down and ...
Ricky Mason's user avatar
  • 1,860
0 votes
0 answers
29 views

Apache Passenger Rails vhost failing after Ruby and Rails upgrade

I recently upgaded three Rails applications: UAM, Proposals, and Projects from Rails 5.2 to 6.1.7.7 and from Ruby 2.7.4 to Ruby 3.3.1. The three applications were previously split from the same ...
Ed Allen's user avatar

15 30 50 per page
1
2 3 4 5
22549