Module: BravoModel::Utils
- Included in:
- Base
- Defined in:
- lib/bravo_model/utils.rb
Instance Method Summary collapse
Instance Method Details
#debug ⇒ Object
5 6 7 8 |
# File 'lib/bravo_model/utils.rb', line 5 def debug raise "err" unless Rails.env.development? valid?; errors. end |
#full_errors(options = {}) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/bravo_model/utils.rb', line 11 def full_errors(={}) arr = errors. arr.reject! { |x| x =~ [:except] } if .key?(:except) arr.select! { |x| x !~ [:only] } if .key?(:only) arr end |