Class: DrawParameter

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/draw_parameter.rb

Instance Method Summary collapse

Instance Method Details

#before_validationObject



5
6
7
8
9
10
11
# File 'app/models/draw_parameter.rb', line 5

def before_validation
  if value == false
    self.value = 0
  elsif value == true
    self.value = 1
  end
end