Fix gem dependency and site search rescue nil
This commit is contained in:
parent
b1d35c59bf
commit
3c95f053ab
2
Gemfile
2
Gemfile
|
@ -102,7 +102,7 @@ group :test, :development do
|
|||
gem "rspec", "~> 2.0"
|
||||
gem "rspec-rails", "~> 2.0"
|
||||
gem "factory_girl_rails"
|
||||
gem "shoulda-matchers"
|
||||
# gem "shoulda-matchers"
|
||||
gem "simplecov"
|
||||
gem "delorean"
|
||||
gem "watchr"
|
||||
|
|
|
@ -45,7 +45,7 @@ class SiteSearchController < ApplicationController
|
|||
tmp[:content] = ""
|
||||
tmp[:matches] = 0
|
||||
mod[:fields].each do |f|
|
||||
value = eval("r.#{f}").gsub(/<\/?[^>]*>/, "").gsub(/ /i,"")
|
||||
value = eval("r.#{f}").gsub(/<\/?[^>]*>/, "").gsub(/ /i,"") rescue ""
|
||||
|
||||
if f=="title" or f=="name"
|
||||
tmp[:title] = value
|
||||
|
|
Loading…
Reference in New Issue