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
10 11 12 13 14 15 16 |
# File 'app/models/searchjoy/search.rb', line 10 def convert(convertable = nil) unless converted? self.converted_at = Time.now self.convertable = convertable save(validate: false) end end |
#converted? ⇒ Boolean
18 19 20 |
# File 'app/models/searchjoy/search.rb', line 18 def converted? converted_at.present? end |