summaryrefslogtreecommitdiffstats
path: root/lib/puppet/rails/param_name.rb
blob: 928838f5c503ecc13f9759d781ba91747b6def4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
class Puppet::Rails::ParamName < ActiveRecord::Base
    has_many :param_values
    belongs_to :resources

    def to_resourceparam(source)
        hash = {}
        hash[:name] = self.name.to_sym
        hash[:source] = source
        hash[:value] = self.param_values.find(:first).value
        Puppet::Parser::Resource::Param.new hash
    end
end