Sha256: 2cb833d65e31a48a115a4d56541b0751d7fea81623878bdd23e2867991647251

Contents?: true

Size: 296 Bytes

Versions: 1

Compression:

Stored size: 296 Bytes

Contents

module Georgia
  class Menu < ActiveRecord::Base

    validates :name, presence: true

    has_many :links, -> { order(position: :asc) }, dependent: :destroy
    accepts_nested_attributes_for :links, allow_destroy: true

    def self.policy_class
      Georgia::NavigationPolicy
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
georgia-0.8.0 app/models/georgia/menu.rb