rails functions for solr