Sha256: 1b3c45fccccb481230f02b13bbca88723eb26fea485186410b9e2a05db63e661
Contents?: true
Size: 971 Bytes
Versions: 1
Compression:
Stored size: 971 Bytes
Contents
class Room < ApplicationRecord has_many :chosen_rooms, inverse_of: :room has_many :chosen_decks, through: :chosen_rooms, inverse_of: :rooms, dependent: :destroy validates :name, uniqueness: { case_sensitive: false }, presence: true validates :code, uniqueness: { case_sensitive: false }, presence: true rails_admin do navigation_label I18n.t(:main_records) navigation_icon 'fa fa-th-large' weight 1 field :name field :code field :description list do scopes [:all, :starts_with_a, :starts_with_b, :starts_with_c, :starts_with_d, :starts_with_e, :starts_with_f, :starts_with_g, :starts_with_h, :starts_with_i, :starts_with_j, :starts_with_k, :starts_with_l, :starts_with_m, :starts_with_n, :starts_with_o, :starts_with_p, :starts_with_q, :starts_with_r, :starts_with_s, :starts_with_t, :starts_with_u, :starts_with_v, :starts_with_w, :starts_with_x, :starts_with_y, :starts_with_z ] field :updated_at end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mobilart_models-1.2.14 | app/models/room.rb |