summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/models/gs_parameter.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/models/gs_parameter.rb b/app/models/gs_parameter.rb
index fe2a845..cd4f47b 100644
--- a/app/models/gs_parameter.rb
+++ b/app/models/gs_parameter.rb
@@ -10,9 +10,13 @@ class GsParameter < ActiveRecord::Base
:presence => true,
:inclusion => { :in => ['String', 'Integer', 'Boolean', 'YAML', 'Nil'] }
- def self.get(wanted_variable)
+ def self.get(wanted_variable, entity=nil, section=nil)
if GsParameter.table_exists?
- item = GsParameter.where(:name => wanted_variable).first
+ if entity || section
+ item = GsParameter.where(:name => wanted_variable, :entity => entity, :section => section).first
+ else
+ item = GsParameter.where(:name => wanted_variable).first
+ end
if item.nil? || item.class_type == 'Nil'
return nil
else