Questions tagged [meta-search]

MetaSearch is a Ruby gem that uses object-based searching for creating search forms.

MetaSearch simplified the task of creating search forms in Ruby on Rails. It provided a DSL for querying models by adding custom fields to the form builder.

The gem is no longer maintained and has been replaced by Ransack. Ransack is a rewrite of MetaSearch and provides many of the same features, but has been designed so that it is easier to maintain with future versions of Rails.

113 questions
0
votes
1 answer

meta_search order by count

I have these models and I'm playing with meta_search to order it. class Company < ActiveRecord::Base has_many :delivers has_many :estimates, :through => :deliver end class Estimate < ActiveRecord::Base has_many :delivers, :dependent =>…
Mattia Lipreri
  • 953
  • 1
  • 16
  • 30
0
votes
1 answer

how to search one object and return another related object

I am trying to create search form when user search for a course it returns list of user's names who are taking that course.So i have user table,course table and user-course join table.I want o use metasearch or ransack.But i wonder how i would use …
katie
  • 2,921
  • 8
  • 34
  • 51
0
votes
1 answer

Is it possible to use MetaSearch on checkboxes for strings?

I have an index page of Users that I want to filter with a search form using MetaSearch. However the values I want to search when I checkbox is clicked are stored as strings. For example, here's a form I want to apply MetaSearch to: <%…
tvalent2
  • 4,959
  • 10
  • 45
  • 87
0
votes
1 answer

metasearch has_many where all/none has to match

Im trying to make a metasearch or alternatively a scope that gives me all objects that doesnt have any of its has_many-association equal to type == "Something". Example: class Order < ActiveRecord::Base has_many :billing_base end class…
0
votes
3 answers

Metasearch - Help with Jquery ajax request when checkbox is pressed

I want to make a Jquery ajax request when a checkbox pressed either true or false. My form:
Rails beginner
  • 14,321
  • 35
  • 137
  • 257
0
votes
1 answer

Is there anyway to change sort_link output params?

I wanna make a page that contains more than one tables. Each table is ajax filtered table that can be sorted using metasearch. This is sorting link for each table. Controller SomeController: def index @search = FirstTable.search(params[:search]) …
raymondralibi
  • 1,933
  • 1
  • 17
  • 25
0
votes
1 answer

Traversing the models with meta_search and referring to the virtual attributes

I'm trying to apply the meta_search to a form where among all the attributes the one is a search by the author's name. It's stored as the two attributes "first_name" and the "last_name" in the table authors. I've created the following virtual…
lyuba
  • 6,250
  • 7
  • 27
  • 37
0
votes
1 answer

Meta Search Engine/ Web Scraping in Android Studio/JAVA

I want to create an application that basically search for something with some filters from various websites (I don't require to login to those third party websites so the data available is open to public) and show it on my application. I have a few…
0
votes
1 answer

Issue with Kaminari while using meta_search for column ordering

I am using Kaminari for pagination and trying to use meta_search for column ordering. I would like my code to look like this: @search = Organization.search(params[:search]) @organizations = @search.page(params[:page]) When I write it this way, I…
0
votes
1 answer

metasearch undefined search method

I am working on a rails 3 app, I am trying to use the meta_search gem. After adding the gem to the GemFile and running bundle install, it seems that there is no search method. undefined method `search' for # I am using…
Tiago Veloso
  • 8,513
  • 17
  • 64
  • 85
0
votes
1 answer

rails metasearch undefined method 'company_id'

I'm new to rails and need your help for what should be a simple problem. when I run this code: @search = User.search(params[:search]) @foundusers = @search.all.paginate :page => params[:page], :per_page => 20 @user = @search.where("users.id = ?",…
ndemoreau
  • 3,849
  • 4
  • 43
  • 55
0
votes
1 answer

Inspect MetaSearch columns

Regarding MetaSearch, I would like to extract "human" names from the search parameters. For example, when the params[:search] has non-blank values for the following: - title_contains - author_name_contains I would like to extract: - title -…
jrhicks
  • 14,759
  • 9
  • 42
  • 57
0
votes
1 answer

Is Ransack has a way to implement token search

Now I have search_field = f.search_field :name_cont I want to create a list of extra words(tokens) that will show a different query. For example, if I type John it will show all Johns, but if I type [] it will show all users without a name. One…
Sviat Safr
  • 41
  • 1
  • 7
0
votes
1 answer

Ransack custom sorting not works

I can't create custom sort for ransack(by scope). Tried to do as the tutorial says, but it not successful. I have next code in my Model. scope :sort_by_custom_name_asc, -> { order('"core_people"."phone" ASC') } Proofs that scope works, sort by…
Sviat Safr
  • 41
  • 1
  • 7
0
votes
1 answer

Rails 3: Aliasing attribute names in meta_search

I am using meta_search as follows: # app/controllers/articles_controller.rb def index @search = Article.search(params[:search]) @articles = @search.all end # app/views/articles/index.html.erb <%= form_for @search, :url => articles_path, :html…
gjb
  • 6,237
  • 7
  • 43
  • 71