title: Dynamic index_name in elasticsearch-rails gem
body: <p>I am using <a href="https://github.com/elasticsearch/elasticsearch-rails/tree/master/elasticsearch-model" rel="nofollow">elasticsearch-rails</a> gem in my rails app. I want to set index name dynamically. In model i did this:</p>
  
  <pre><code>index_name {Account.current_account.subdomain}
  </code></pre>
  
  <p>Currently there is no support in the gem to do this. Here is the index_name method define in gem</p>
  
  <p>naming.rb</p>
  
  <pre><code># TODO: Dynamic names a la Tire -- `Article.index_name { "articles-#{Time.now.year}" }`
  #
  def index_name name=nil
      @index_name = name || @index_name || self.model_name.collection.gsub(/\//, '-')
  end
  </code></pre>
  
  <p>How can i get this working? Thanks</p>