In Rails 3
If you add a dir directly under app/
Do nothing. All files in this dir are eager loaded in production and lazy loaded in development by default.
If you add a dir under app/something/
(e.g. app/models/concerns/, app/models/products/)
|# Run with: rake environment elasticsearch:reindex|
|# Begins by creating the index using tire:import command|
|# This will create the "official" index name, e.g. "person" each time.|
|# Then we rename it to, e.g. "person20121001" and alias "person" to it.|
|namespace :elasticsearch do|
|desc "re-index elasticsearch"|
|task :reindex => :environment do|
|klasses = [Ticket]|
Influenced by the blog post: http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
I have added some things which make sense at the state I am in.
Conventions for this fork:
This gist is a fork of the gist from this blog post.