lib/rails/templates/03-expert.rb in elasticsearch-rails-5.1.0 vs lib/rails/templates/03-expert.rb in elasticsearch-rails-6.0.0.pre
- old
+ new
@@ -181,11 +181,11 @@
git commit: "-m 'Refactored the Elasticsearch integration into a concern\n\nSee:\n\n* http://37signals.com/svn/posts/3372-put-chubby-models-on-a-diet-with-concerns\n* http://joshsymonds.com/blog/2012/10/25/rails-concerns-v-searchable-with-elasticsearch/'"
# ----- Add Sidekiq indexer -----------------------------------------------------------------------
puts
-say_status "Application", "Adding Sidekiq worker for updating the index...\n", :yellow
+say_status "Sidekiq", "Adding Sidekiq worker for updating the index...\n", :yellow
puts '-'*80, ''; sleep 0.25
gem "sidekiq"
run "bundle install"
@@ -238,9 +238,21 @@
get 'https://raw.githubusercontent.com/elastic/elasticsearch-rails/master/elasticsearch-rails/lib/rails/templates/search.css', 'app/assets/stylesheets/search.css'
git add: "app/controllers/ test/controllers/ config/routes.rb"
git add: "app/views/search/ app/assets/stylesheets/search.css"
git commit: "-m 'Added SearchController#index'"
+
+# ----- Add SearchController -----------------------------------------------------------------------
+
+puts
+say_status "Views", "Updating application layout...\n", :yellow
+puts '-'*80, ''; sleep 0.25
+
+insert_into_file 'app/views/layouts/application.html.erb', <<-CODE, before: '</head>'
+ <link href="https://fonts.googleapis.com/css?family=Rokkitt:400,700" rel="stylesheet">
+CODE
+
+git commit: "-a -m 'Updated application template'"
# ----- Add initializer ---------------------------------------------------------------------------
puts
say_status "Application", "Adding Elasticsearch configuration in an initializer...\n", :yellow