OSDN Git Service

fix
[pettanr/pettanr.git] / lib / validators / reverse_validator.rb
index 4965fc8..d65a5ba 100644 (file)
@@ -1,6 +1,7 @@
 class ReverseValidator < ActiveModel::EachValidator\r
   def validate_each(record, attribute, value)\r
-    if record.picture and record.picture.flag_reverse < 0\r
+    record.picture.boosts 'post'\r
+    if record.picture and record.picture.license_extend.reverse < 0\r
       record.errors[attribute] << (options[:message] || I18n.t('activerecord.errors.messages.reverse')) if value < 0\r
     end\r
   end\r