Sha256: fd013044e800e824e1e7203fc61f38c02b8ccf06bb898b8a6b99bfeb1ab74b2d
Contents?: true
Size: 1.11 KB
Versions: 17
Compression:
Stored size: 1.11 KB
Contents
# Simple model to store basic info about the Ansible role class AnsibleRole < ApplicationRecord audited include Authorizable self.include_root_in_json = false validates :name, :presence => true, :uniqueness => true has_many :host_ansible_roles has_many_hosts :through => :host_ansible_roles, :dependent => :destroy has_many :hostgroup_ansible_roles has_many :hostgroups, :through => :hostgroup_ansible_roles, :dependent => :destroy scoped_search :on => :name, :complete_value => true scoped_search :on => :updated_at scoped_search :relation => :hosts, :on => :id, :rename => :host_id, :only_explicit => true scoped_search :relation => :hosts, :on => :name, :rename => :host, :only_explicit => true scoped_search :relation => :hostgroups, :on => :id, :rename => :hostgroup_id, :only_explicit => true scoped_search :relation => :hostgroups, :on => :name, :rename => :hostgroup, :only_explicit => true # Methods to be allowed in any template with safemode enabled class Jail < Safemode::Jail allow :name end end
Version data entries
17 entries across 17 versions & 1 rubygems