Sha256: 61e34744f9c2fdee211138912b604e8f66b101f8db1ad6517a9a6905160afaf5
Contents?: true
Size: 452 Bytes
Versions: 7
Compression:
Stored size: 452 Bytes
Contents
module Optimacms class Language < ActiveRecord::Base self.table_name = 'cms_languages' scope :admin_enabled, -> { where("1=1").order('pos asc')} ### search searchable_by_simple_filter ### def self.list_with_default rows = ['']+Language.admin_enabled.all.map(&:lang) end def self.get_id_by_name(name) self.where(lang: name).first.id rescue nil end end end
Version data entries
7 entries across 7 versions & 1 rubygems