Class: Searchjoy::Search
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Searchjoy::Search
- Defined in:
- app/models/searchjoy/search.rb
Instance Method Summary collapse
Instance Method Details
#convert(convertable = nil) ⇒ Object
12 13 14 15 16 17 18 |
# File 'app/models/searchjoy/search.rb', line 12 def convert(convertable = nil) unless converted? self.converted_at = Time.now self.convertable = convertable save(validate: false) end end |
#converted? ⇒ Boolean
20 21 22 |
# File 'app/models/searchjoy/search.rb', line 20 def converted? converted_at.present? end |