samedi 27 mai 2023

How to preserve time data when page is refreshed in Ruby on Rails?

How can I get it to return the time without changing when I refresh the page (example: it's 12:02, I refresh the page at 12:05 and 12:02 is not saved, 12:05 appears)

 def change
    create_table :registers do |t|
      t.string :worker
      t.string :code
      t.time :work_hour
      
      t.timestamps
    end
    add_index :registers, :worker
  end

I was hoping that the time would not be edited when refreshing the page

Aucun commentaire:

Enregistrer un commentaire