Handle nil description, not_found case
This commit is contained in:
parent
0dc5f24c6c
commit
0349588c33
|
@ -38,6 +38,9 @@ class window.Search
|
|||
else if data.status == 'fail'
|
||||
_search.hideSpinner()
|
||||
_page.print data.html
|
||||
else if data.status == 'not_found'
|
||||
_search.hideSpinner()
|
||||
alert "Not found"
|
||||
false
|
||||
|
||||
showSuggestions: (values) ->
|
||||
|
|
|
@ -11,6 +11,6 @@ class Artist < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def prepare_description
|
||||
self.desc.gsub! /[\[<].*?[\]>]/, ''
|
||||
self.desc.gsub! /[\[<].*?[\]>]/, '' unless self.desc.nil?
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue