pdfshop/app/models/order_faq.rb

21 lines
564 B
Ruby

# == Schema Information
#
# Table name: order_faqs
#
# id :integer not null, primary key
# title :string(40) not null
# description :text(65535) not null
# position :integer default(0), not null
# active :integer default(0), not null
# created_at :datetime
# created_by :bigint(8)
# updated_at :datetime
# updated_by :bigint(8)
#
# order FAQ class
class OrderFaq < ApplicationRecord
scope :available, -> { where(active: true) }
scope :by_position_asc, -> { order('position ASC') }
end