Class: FlyingSphinx::Railtie
- Inherits:
-
Rails::Railtie
- Object
- Rails::Railtie
- FlyingSphinx::Railtie
- Defined in:
- lib/flying_sphinx/railtie.rb
Class Method Summary collapse
Class Method Details
.remote_sphinx? ⇒ Boolean
20 21 22 |
# File 'lib/flying_sphinx/railtie.rb', line 20 def self.remote_sphinx? ENV['FLYING_SPHINX_IDENTIFIER'] || ENV['STAGED_SPHINX_IDENTIFIER'] end |
.set_up_remote_connection ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/flying_sphinx/railtie.rb', line 24 def self.set_up_remote_connection return unless remote_sphinx? configuration = FlyingSphinx::Configuration.new ThinkingSphinx::Configuration.instance.settings['connection_options'] = { :host => configuration.host, :port => 9306, :username => configuration.username } end |