Sha256: d0e6011978ce66c7300fb6124ed6d7b5b02b00a2993a13f90bdb28275d2086c0
Contents?: true
Size: 264 Bytes
Versions: 3
Compression:
Stored size: 264 Bytes
Contents
require_relative './application_record' class Micropost < ApplicationRecord belongs_to :user, counter_cache: true enum status: {draft: 0, published: 1, archived: 2 } scope :created_on, ->(date) {where("date(microposts.created_at) = ?", date.to_date)} end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
active_hash_relation-1.4.1 | spec/models/micropost.rb |
active_hash_relation-1.4.0 | spec/models/micropost.rb |
active_hash_relation-1.2.0 | spec/models/micropost.rb |