Skip to content
Browse files

RAILS_ENV -> Rails.env

  • Loading branch information...
1 parent eb64a8f commit dc0f80ba8945c19eaf87e7b94b748f47221c733b @beyond beyond committed with Jul 7, 2011
Showing with 3 additions and 3 deletions.
  1. +2 −2 lib/search_do.rb
  2. +1 −1 lib/search_do/backends/hyper_estraier.rb
View
4 lib/search_do.rb
@@ -264,8 +264,8 @@ def strip_tags(text)
end
def connect_backend(active_record_config) #:nodoc:
- backend_config = active_record_config[RAILS_ENV]['search'] || \
- active_record_config[RAILS_ENV]['estraier'] || {}
+ backend_config = active_record_config[Rails.env]['search'] || \
+ active_record_config[Rails.env]['estraier'] || {}
self.search_backend = Backends.connect(self, backend_config)
end
View
2 lib/search_do/backends/hyper_estraier.rb
@@ -197,7 +197,7 @@ def benchmark(log, &block)
end
def calculate_node_name(config)
- node_prefix = config['node_prefix'] || config['node'] || RAILS_ENV
+ node_prefix = config['node_prefix'] || config['node'] || Rails.env
"#{node_prefix}_#{@ar_class.table_name}"
end

0 comments on commit dc0f80b

Please sign in to comment.
Something went wrong with that request. Please try again.