Sha256: 5ad100b8d2f6478cd9a0ea6a48b96e6f613b4fbdeb4c9bcb1743630c336c230b

Contents?: true

Size: 375 Bytes

Versions: 12

Compression:

Stored size: 375 Bytes

Contents

class Settings
  include Mongoid::Document
  include Mongoid::Timestamps
  include Sunrise::Models::Settings
  include PublicActivity::Model
  
  # Columns
  field :var, :type => String
  field :value, :type => String
  
  index({var: 1}, {unique: true})

  tracked owner: ->(controller, model) { controller.try(:current_user) }

  def self.table_exists?
    true
  end
end 

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
sunrise-cms-0.6.11 lib/generators/sunrise/templates/models/mongoid/settings.rb
sunrise-cms-0.6.10 lib/generators/sunrise/templates/models/mongoid/settings.rb
sunrise-cms-0.6.9 lib/generators/sunrise/templates/models/mongoid/settings.rb
sunrise-cms-0.6.8 lib/generators/sunrise/templates/models/mongoid/settings.rb
sunrise-cms-0.6.7 lib/generators/sunrise/templates/models/mongoid/settings.rb
sunrise-cms-0.6.6 lib/generators/sunrise/templates/models/mongoid/settings.rb
sunrise-cms-0.6.5 lib/generators/sunrise/templates/models/mongoid/settings.rb
sunrise-cms-0.6.4 lib/generators/sunrise/templates/models/mongoid/settings.rb
sunrise-cms-0.6.3 lib/generators/sunrise/templates/models/mongoid/settings.rb
sunrise-cms-0.6.2 lib/generators/sunrise/templates/models/mongoid/settings.rb
sunrise-cms-0.6.1 lib/generators/sunrise/templates/models/mongoid/settings.rb
sunrise-cms-0.6.0 lib/generators/sunrise/templates/models/mongoid/settings.rb