Class: ActiveTree::Query
- Inherits:
-
Object
- Object
- ActiveTree::Query
- Defined in:
- lib/active_tree/queries/active_tree_query.rb
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#valid?(attribute, value) ⇒ Boolean
2 3 4 5 6 7 |
# File 'lib/active_tree/queries/active_tree_query.rb', line 2 def valid?(attribute, value) return false if !attribute.is_a? Symbol return false if value.nil? || value.empty? || !value.present? return valse if [ "", [], ["0"], [ 0 ], "all", "any" ].include? value return true end |