refactored JavaScript code not to use inline Ruby evaluation

This commit is contained in:
Hauke Klement
2015-03-12 09:13:38 +01:00
parent ca7679cb2d
commit f1de18141a
3 changed files with 25 additions and 11 deletions

View File

@@ -24,9 +24,9 @@ class FileType < ActiveRecord::Base
end
def set_default_values
self.binary ||= false
self.executable ||= false
self.renderable ||= false
self.binary ||= false if has_attribute?(:binary)
self.executable ||= false if has_attribute?(:executable)
self.renderable ||= false if has_attribute?(:renderable)
end
private :set_default_values