diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/acts_as_xapian/acts_as_xapian.rb | 2 | ||||
-rw-r--r-- | lib/acts_as_xapian/tasks/xapian.rake | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/acts_as_xapian/acts_as_xapian.rb b/lib/acts_as_xapian/acts_as_xapian.rb index 7076fc586..784d7ae87 100644 --- a/lib/acts_as_xapian/acts_as_xapian.rb +++ b/lib/acts_as_xapian/acts_as_xapian.rb @@ -844,7 +844,7 @@ module ActsAsXapian raise "Only Time or Date types supported by acts_as_xapian for :date fields, got " + value.class.to_s end elsif type == :boolean - value ? true : false + !!value else # Arrays are for terms which require multiple of them, e.g. tags if value.kind_of?(Array) diff --git a/lib/acts_as_xapian/tasks/xapian.rake b/lib/acts_as_xapian/tasks/xapian.rake index c1986ce1e..52d94011a 100644 --- a/lib/acts_as_xapian/tasks/xapian.rake +++ b/lib/acts_as_xapian/tasks/xapian.rake @@ -9,7 +9,7 @@ namespace :xapian do # "verbose=true" to print model name as it is run. desc 'Updates Xapian search index with changes to models since last call' task :update_index => :environment do - ActsAsXapian.update_index(ENV['flush'] ? true : false, ENV['verbose'] ? true : false) + ActsAsXapian.update_index(ENV['flush'], ENV['verbose']) end # Parameters - specify 'models="PublicBody User"' to say which models |