summaryrefslogtreecommitdiffstats
path: root/lib/puppet/rails
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/rails')
-rw-r--r--lib/puppet/rails/resource.rb12
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/puppet/rails/resource.rb b/lib/puppet/rails/resource.rb
index 0a9172a42..3b2e78b3a 100644
--- a/lib/puppet/rails/resource.rb
+++ b/lib/puppet/rails/resource.rb
@@ -48,11 +48,7 @@ class Puppet::Rails::Resource < ActiveRecord::Base
end
def file
- if f = self.source_file
- return f.filename
- else
- return nil
- end
+ return (f = self.source_file) ? f.filename : nil
end
def file=(file)
@@ -179,11 +175,7 @@ class Puppet::Rails::Resource < ActiveRecord::Base
def parameter(param)
if pn = param_names.find_by_name(param)
- if pv = param_values.find(:first, :conditions => [ 'param_name_id = ?', pn])
- return pv.value
- else
- return nil
- end
+ return (pv = param_values.find(:first, :conditions => [ 'param_name_id = ?', pn])) ? pv.value : nil
end
end