Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
-1 votes
0 answers
26 views

Why is the data in a Rails view displaying as 0.0 or 42.0 instead of $42.00?

Question Title: Why is the data in a Rails view displaying as 0.0 or 42.0 instead of $42.00? Summary: How can I get this field to display e.g. $42.00 instead of 0.0 or 42.0? In addition to the ...
Jennifer James's user avatar
1 vote
1 answer
46 views

Ruby module is not an ancestor after prepend

I'm developing a plugin to the Rails (6.1.7) project Foreman (v3.5.1; based on the Foreman Plugin Template) and face the issue that one of my modules (DnsInterfaceExtensions) ought to be prepended to ...
Xavier Mol's user avatar
0 votes
0 answers
36 views

How can I fix Postgres errors in Minitest?

I am using Minitest and Postgres to test my Rails website. When I added a "Like" model, I started getting Postgresql deadlock errors Minitest::UnexpectedError: ActiveRecord::Deadlocked: PG::...
tolia k's user avatar
0 votes
0 answers
31 views

finding the appropriate session for an IdP single logout request with Ruby SAML

I'm putting together a gem for our Rails apps to use SAML single sign-on/logout via Entra ID. I had some questions about the final bit I need to implement: ID provider initiated single logout requests....
Dave's user avatar
  • 523
1 vote
1 answer
92 views

How to set view context in Rails?

I’m building a gem that intercepts Rails’ default render behavior. Instead of rendering a view, it looks for a helper method that corresponds to the current controller’s action name; it then uses the ...
Dennis Hackethal's user avatar
0 votes
2 answers
74 views

How can I update how ActiveRecord::Base#where interprets ranges?

It appears that ActiveRecord::Base#where partially distinguishes between ranges defined with 2 dots (0..) and ranges defined with 3 dots (0...). E.g. > User.where(id: ..0).to_sql => "SELECT ...
gabeodess's user avatar
  • 2,172
0 votes
3 answers
66 views

authentication from scartch in rails

Hi i am learning rails from the Odin project and i am creating a simple authentication without using devise . the course doesn't really give enough info to help beginners finish that project so, Here ...
Student CZ's user avatar
1 vote
1 answer
42 views

Rails form_with-helper: What is a :scope?

I'm currently reading the Ruby on Raily API-documentation. Specific the part about the form_with helper: https://api.rubyonrails.org/v5.1.7/classes/ActionView/Helpers/FormHelper.html#method-i-...
cluster1's user avatar
  • 5,458
0 votes
1 answer
86 views

Rails 7 error during application start - Zeitwerk-related errors

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
1 vote
1 answer
64 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
1 answer
32 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
-1 votes
0 answers
26 views

Implement prometheus and garafana for a ruby on rails application [closed]

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
75 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
1 answer
51 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
  • 927
0 votes
1 answer
63 views

How do I make sure that I only load flights on search and not initial page load

Rails baby here! trying to work it out with Rails 7. I have a small toy app here that tries to search for flights then have users book a flight. I have managed to string together the app to a point of ...
Taku Mapfumo's user avatar

15 30 50 per page
1
2 3 4 5
7485