Sha256: ebba3bd843abb8807e80c0256cb066ad3c16d8a7a5c515d2abacb30aa6550883

Contents?: true

Size: 539 Bytes

Versions: 7

Compression:

Stored size: 539 Bytes

Contents

module Pwb
  # https://github.com/zilkey/active_hash
  class Theme < ActiveJSON::Base
    set_root_path "#{Pwb::Engine.root}/app/themes"
    set_filename "config"
    # use_multiple_files
    # set_filenames "default"

    # not possible to set primary_key like so:
    # self.primary_key = :name

    include ActiveHash::Associations
    # has_one :agency, foreign_key: "theme_name", class_name: "Pwb::Agency", primary_key: "name"
    has_one :website, foreign_key: "theme_name", class_name: "Pwb::Website", primary_key: "name"
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pwb-1.4.0 app/models/pwb/theme.rb
pwb-1.3.0 app/models/pwb/theme.rb
pwb-1.2.0 app/models/pwb/theme.rb
pwb-1.1.1 app/models/pwb/theme.rb
pwb-1.0.0 app/models/pwb/theme.rb
pwb-0.1.1 app/models/pwb/theme.rb
pwb-0.1.0 app/models/pwb/theme.rb