Method: Conjoin::ActiveRecord::Form#valid_only?
- Defined in:
- lib/conjoin/active_record.rb
#valid_only?(*columns) ⇒ Boolean
187 188 189 190 191 192 193 |
# File 'lib/conjoin/active_record.rb', line 187 def valid_only? *columns self.valid? self.errors..each do |field, | self.errors.delete(field) unless columns.include? field end !self.errors.present? end |