Class: JobTemplateEffectiveUser
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- JobTemplateEffectiveUser
- Defined in:
- app/models/job_template_effective_user.rb
Instance Method Summary collapse
Instance Method Details
#compute_value ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'app/models/job_template_effective_user.rb', line 14 def compute_value if current_user? User.current.login elsif value.present? value else Setting[:remote_execution_effective_user] end end |
#set_defaults ⇒ Object
9 10 11 12 |
# File 'app/models/job_template_effective_user.rb', line 9 def set_defaults self.overridable = true if self.overridable.nil? self.current_user = false if self.current_user.nil? end |