Sha256: 17ffa6939be8a5d056e40ba525dd5cf6d20e5ff90bdfd9f292387c2d0848b35f

Contents?: true

Size: 326 Bytes

Versions: 5

Compression:

Stored size: 326 Bytes

Contents

class CommonParameter < Parameter
  audited :except => [:priority]
  validates_uniqueness_of :name

  scoped_search :on => :name, :complete_value => :true
  scoped_search :on => :value, :complete_value => :true

  def as_json(options={})
    options ||= {}
    super({:only => [:name, :value, :id]}.merge(options))
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
foreman_discovery-1.0.0 test/foreman_app/app/models/common_parameter.rb
foreman_discovery-1.0.0.rc4 test/foreman_app/app/models/common_parameter.rb
foreman_discovery-1.0.0.rc3 test/foreman_app/app/models/common_parameter.rb
foreman_discovery-1.0.0.rc2 test/foreman_app/app/models/common_parameter.rb
foreman_discovery-1.0.0.rc1 test/foreman_app/app/models/common_parameter.rb