Sha256: 23e1e9ade9a9b5d5f3a06934b1fd2d91b13e7180d19bec2b9acd3832f59b68e2

Contents?: true

Size: 523 Bytes

Versions: 10

Compression:

Stored size: 523 Bytes

Contents

# Simple model to store basic info about the Ansible role
class AnsibleRole < ActiveRecord::Base
  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
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
foreman_ansible-1.4.5 app/models/ansible_role.rb
foreman_ansible-1.4.3 app/models/ansible_role.rb
foreman_ansible-1.4.2 app/models/ansible_role.rb
foreman_ansible-1.4.1 app/models/ansible_role.rb
foreman_ansible-1.4.0 app/models/ansible_role.rb
foreman_ansible-1.3.1 app/models/ansible_role.rb
foreman_ansible-1.3.0 app/models/ansible_role.rb
foreman_ansible-1.2.1 app/models/ansible_role.rb
foreman_ansible-1.2 app/models/ansible_role.rb
foreman_ansible-1.1 app/models/ansible_role.rb