Commit 350e5649 by ivan Lan

Add presence validation to series

parent 2ea817e9
...@@ -24,6 +24,8 @@ module Shotengai ...@@ -24,6 +24,8 @@ module Shotengai
class Series < Shotengai::Model class Series < Shotengai::Model
self.table_name = 'shotengai_series' self.table_name = 'shotengai_series'
validates_presence_of :spec validates_presence_of :spec
validates_presence_of :price
validate :check_spec_value validate :check_spec_value
validate :check_remark validate :check_remark
# Using validates_uniqueness_of do not work if the order of Hash is diff # Using validates_uniqueness_of do not work if the order of Hash is diff
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment