rails8-memoapp/app/models/memo.rb

12 lines
244 B
Ruby
Raw Normal View History

2025-02-20 22:46:52 +09:00
class Memo < ApplicationRecord
validates :content, presence: true
def self.ransackable_attributes(_auth_object = nil)
%w[content created_at id updated_at]
end
def self.ransackable_associations(_auth_object = nil)
[]
2025-02-20 22:46:52 +09:00
end
end