How Do I get searchlogic to work with rails 3?
There's the railsdog's searchlogic fork on github that supports Rails 3.
You can add it to your Gemfile like this:
gem 'rd_searchlogic', :require => 'searchlogic', :git => 'git://github.com/railsdog/searchlogic.git'
Will searchlogic work with Rails 3?
Metawhere - http://metautonomo.us/projects/metawhere/
looks like a promising alternative.
ps: discovered metawhere through rubyflow.com.
MetaSearch (http://metautonomo.us/2010/03/07/metasearch-object-based-searching-for-rails-3/)
by the same author is actually closer to Searchlogic.
Ruby on Rails: 2.3.8: How do I get searchlogic to work with bundler?
As it turns out, the version(s) of searchlogic that I can use don't work with bundler, so I just kept this in my environment.rb:
config.gem "searchlogic", :version => "whatever"
rails 3 meta_search usage
The methods are attributes to be set in a FormBuilder. As such, you'll want to call user_name_equals = "Bob", not user_name_equals("Bob"). Also, they'll be on a search instance, not the model itself.
@search = User.search(:user_name_eq => "Bob")
If you're looking for something to use in day to day query construction, try MetaWhere instead. http://metautonomo.us/projects/metawhere
I have a little problem with Searchlogic in Rails 3
I'm not actually sure Searchlogic works with Rails 3. I think the current gem you want to use is MetaSearch:
https://github.com/ernie/meta_search
I think the syntax is almost exactly the same so anything that you've setup in Searchlogic will carry over to Metasearch.
Hope this helps!
how would I translate this from searchlogic to metwhere in Rails 3?
It seems that metawhere doesn't have !=
operator it was added in sqeel
so here is a possible workaround
Todo.where( { :contact_id => self.id} ).order( :original_date.asc ).where( '"todos"."done_date" NOT NULL' ).first
Related Topics
What Are the Ruby's Object#Taint and Object#Trust Methods
Ruby: Select a Hash from Inside an Array
Ruby on Rails, Could Not Find a Valid Gem 'Rails'
Why Are Symbols Not Frozen Strings
Renaming Uploaded Files with Carrierwave
How to Group This Array of Hashes
Deleting Table from Schema - Rails
Rails: Your User Account Isn't Allowed to Install to the System Rubygems
Ruby Regex What Does the \1 Mean for Gsub
Ruby Array Each_Slice_With_Index
Failed to Build JSON (1.6.3) with Native Extension After I Installed Xcode 4.2
Using Polymorphic Paths with Nested Associations
How to Delete Special Characters
Are There Unintended Consequences of Ruby's 'Begin ... End' Without 'Rescue' Used as a Code Block
Is Autoload Thread-Safe in Ruby 1.9