mirror of
https://github.com/Neetpone/foalfetch.git
synced 2025-02-08 18:06:43 +01:00
14 lines
344 B
Ruby
14 lines
344 B
Ruby
# frozen_string_literal: true
|
|
# == Schema Information
|
|
#
|
|
# Table name: visit_counts
|
|
#
|
|
# id :bigint not null, primary key
|
|
# count :integer default(0), not null
|
|
# date :date not null
|
|
#
|
|
class VisitCount < ApplicationRecord
|
|
def self.for_today
|
|
VisitCount.find_or_create_by(date: Time.zone.today)
|
|
end
|
|
end
|