24 lines
459 B
Ruby
24 lines
459 B
Ruby
# main setting is stored in this model
|
|
class ScSetting < ApplicationRecord
|
|
has_one :image, as: :imageable, dependent: :destroy
|
|
|
|
YESNO_BOOL = {
|
|
true => I18n.t('a_yes'),
|
|
false => I18n.t('a_no')
|
|
}.freeze
|
|
|
|
YESNO = {
|
|
true => 1,
|
|
false => 0
|
|
}.freeze
|
|
|
|
YESNO_F = [
|
|
{ 'text' => I18n.t('a_no'), 'value' => 0 },
|
|
{ 'text' => I18n.t('a_yes'), 'value' => 1 }
|
|
].to_json
|
|
|
|
def order_faqs
|
|
OrderFaq.available.by_position_asc
|
|
end
|
|
end
|