Created
October 3, 2012 07:12
-
-
Save mculp/3825529 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if ENV['BONSAI_INDEX_URL'] | |
| Tire.configure do | |
| url "http://index.bonsai.io" | |
| end | |
| BONSAI_INDEX_NAME = ENV['BONSAI_INDEX_URL'][/[^\/]+$/] | |
| else | |
| app_name = Rails.application.class.parent_name.underscore.dasherize | |
| app_env = Rails.env | |
| BONSAI_INDEX_NAME = "#{app_name}-#{app_env}" | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Searchable | |
| extend ActiveSupport::Concern | |
| included do | |
| include Tire::Model::Search | |
| include Tire::Model::Callbacks | |
| index_name BONSAI_INDEX_NAME | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment