model testimonial

jarocki_art Jul 4th, 2019 (edited) 95 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Testimonial < ApplicationRecord
  2.   has_one_attached :userpic
  3.   has_one_attached :object_photo_1
  4.   has_one_attached :object_photo_2
  5.   has_one_attached :object_photo_3
  7.   validates :name, presence: true
  8.   validates :video, presence: true, if: { |t| t.text.blank? }
  9.   validates :text, presence: true, if: { |t| }
  10. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand