Answer the question
In order to leave comments, you need to log in
Doing update parameters after a specific time in rails?
there is something similar to
class CreateBooks < ActiveRecord::Migration
def change
create_table :books do |t|
t.string:name
t.boolean:active
t.boolean:
rented
t.string :
time
end
end
end javan/whenever but it seems there is something more logical
Answer the question
In order to leave comments, you need to log in
RoR by itself does not work in the background (i.e. when no HTTP request is being made).
To execute tasks on a timer, in any case, you need a separate worker process. Then there may be options, whenever or something else, but in general, in modern projects, usually whenever.
You set up a background. For example sidekiq
You start an activejob task.
Run it periodically every time
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question