Module: MongoModel::AttributeMethods::Query
- Extended by:
- ActiveSupport::Concern
- Included in:
- EmbeddedDocument
- Defined in:
- lib/mongomodel/concerns/attribute_methods/query.rb
Instance Method Summary collapse
-
#query_attribute(name) ⇒ Object
Returns true if the attribute is not blank (i.e. it has some value).
Instance Method Details
#query_attribute(name) ⇒ Object
Returns true if the attribute is not blank (i.e. it has some value). Otherwise returns false.
11 12 13 |
# File 'lib/mongomodel/concerns/attribute_methods/query.rb', line 11 def query_attribute(name) attributes.has?(name.to_sym) end |