9,402 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
17
views
Rails 5 Upgrade- request.fullpath not returning the same value as Rails 4 for Controller Tests
I've recently upgraded my app to Rails 5.2 from Rails 4.2 and I'm seeing some fallout in my in my contrioller tests.
In the Rails 4 engine, the value of the request.fullpath in my test case returns as:...
0
votes
0
answers
52
views
ActiveAdmin is slow with a large number of admin files in Rails 5.1.4
Issue:
I am using Rails 5.1.4, Ruby 2.5.1, and ActiveAdmin 1.2.1. My application has around 400 ActiveAdmin resource files, which is causing performance issues. The admin panel loads very slowly, ...
-1
votes
1
answer
47
views
collection_check_boxes messes with update values
In my Rails 5 project I have 3 models, User, Book, and UserBook. Basically the user_books table is a connecting table connecting users to books.
This is my UserBook model
class UserBook < ...
-1
votes
1
answer
64
views
ROR + ENV Variables vs RedisDB Value
In my current ROR application, I'm using both ENV variables and RedisDB variables as well.
For a single change in ENV variables, I have to restart all servers; by this, lots of jobs fail (dirty exit).
...
1
vote
1
answer
55
views
Handle different error message based on business logic for a single attribute
I have a single attribute in the entities table called reporting_name. I need to display two different error messages based on business logic for different sites. If validation fails for the ...
0
votes
1
answer
79
views
Retrive actual file name from Rails ActiveStorage S3 file name
I have to migrate assets(images) from Rails ActiveStorage uploaded file to S3 into my another WordPress website.
However, it seems the filename is they Blob key similar to as below:
...
0
votes
1
answer
55
views
Rails 5.1.7 cache methods are not working
I'm trying to execute this statement of Rails Cache in console:
Rails.cache.fetch('some_other_key', expires_in: 24.hours) { 50 + 50 }
It is throwing error like this:
ArgumentError (wrong number of ...
1
vote
1
answer
69
views
Why isn't referred_by being set?
I am trying to follow/reproduce this tutorial here https://gorails.com/episodes/referral-program-from-scratch?autoplay=1
Code is here: https://github.com/gorails-screencasts/referral-program
So far my ...
1
vote
1
answer
112
views
ChartJS : Fill within a curve dataset above a max, in between max/min, and below min limit with different color
Rails 5, ChartKick 5.0.5 => ChartJS 4.4.1
I have a curved line chart in ChartJS that plots about 0 on the Y axis with separate maximum threshold for positive values and minimum for negative values (...
1
vote
1
answer
301
views
Minitest mock not handling named parameters
I have a line of code:
@coverage_class.where(original_id: coverage.id, waiting_for_doc_requests: false)
and my unit test is doing the following expect:
mock = Minitest::Mock.new
mock.expect(:where, :...
0
votes
0
answers
54
views
Why I see ajax response instead of view in my RAILS 5 app
I have button which submit login form. This button generate POST request for my session controller
Started POST "/login" for 127.0.0.1 at 2024年04月03日 10:49:13 +0300
Processing by ...
0
votes
0
answers
120
views
LoadError: cannot load such file -- mysql2/mysql2
I'm working on a rails application which is built on rails version 5.0.2 and ruby version 2.5.8.
The database used for this is mysql2 version 0.4.10. I also installed the mysql service which is on ...
0
votes
1
answer
38
views
Rails 5 does not reference a modified ActiveRecord-jdbc-adapter
problem overview
I have a client with an App I'm trying to get to Rails 5. Historically we modified the activerecord-jdbc-adapter to access a Progress OpenEdge database, and it's been working since ...
0
votes
0
answers
225
views
Rails before_update not triggering on update but save works
Model looks like
class Campaign < ActiveRecord::Base
before_update :delete_triggers
def delete_triggers
Trigger.where(campaign_id: id).delete_all
end
end
and in the controller I do
...
1
vote
1
answer
306
views
How to Implement Tracking IDs for Rails Logs in Karafka Server?
I'm developing a Rails application where I'm utilizing the Karafka gem alongside the Rails server. To enhance traceability, I've successfully configured Rails to include a tracking ID for incoming ...