Commit c37cf6f258d5e59cd555a5121654ab953ba515e8

Authored by Andrey Koleshko
1 parent c861f483

Use string interpolation to get index name

* String interpolation works faster
* Now you are able to pass even symbol in the option for custom index name
* The code is clearer
Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
lib/searchkick/reindex.rb
... ... @@ -7,7 +7,7 @@ module Searchkick
7 7 skip_import = options[:import] == false
8 8  
9 9 alias_name = searchkick_index.name
10   - new_name = alias_name + "_" + Time.now.strftime("%Y%m%d%H%M%S%L")
  10 + new_name = "#{alias_name}_#{Time.now.strftime('%Y%m%d%H%M%S%L')}"
11 11 index = Searchkick::Index.new(new_name)
12 12  
13 13 clean_indices
... ...