app/models/mega_bar/checkbox.rb in mega_bar-0.0.1 vs app/models/mega_bar/checkbox.rb in mega_bar-0.5.1
- old
+ new
@@ -1,8 +1,13 @@
module MegaBar
class Checkbox < ActiveRecord::Base
+ validates_presence_of :field_display_id
scope :by_field_display_id, ->(field_display_id) { where(field_display_id: field_display_id)}
+ validates_uniqueness_of :field_display_id
def get_model_id
- 9
+ 14
end
+ def controller_name
+ 'mega_bar/checkboxes'
+ end
end
-end
\ No newline at end of file
+end