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 NoMethodError when using fields_or_fields structure query

I am using meta_search. The following gives correct results: User.search({:first_name_contains_any => ["peter", "john"]}).all User.search({:last_name_contains_any => ["wong", "lee"]}).all But the following does not work and throws…
PeterWong
  • 15,951
  • 9
  • 59
  • 68
0
votes
1 answer

get links from search engines in c#

first of all excuse me for my broken english i want to code a metasearch engine first i try to use google bing and yahoo api s but theye were limited then i'm trying to use htmlagility pack to gain results link of search engines i have this…
mary
  • 247
  • 3
  • 20
0
votes
1 answer

Meat_search in ActiveAdmin is not working in case user selects datetime as search criteria

When you access your admin page, search filter used to return the results as expected for dates selected. filter :hash_key filter :serial_number filter :partner filter :created_at I have made changes to tables like added few more…
0
votes
1 answer

ActiveAdmin :date_range filter type causes undefined_method error (MetaSearch)

I am implementing ActiveAdmin and would like to use the :date_range filter type on my Job table's date column. According to the documentation this just needs to be set as filter [:attr], :as => :date_range. When I use this code I get the following…
sixty4bit
  • 7,422
  • 7
  • 33
  • 57
0
votes
4 answers

Rails 4 I can't install gems

Hello I want to install these gem 'activeadmin', gem "meta_search", '>= 1.1.0.pre' gems to my project but I got error like this Bundler could not find compatible versions for gem "actionpack": In snapshot (Gemfile.lock): actionpack…
0
votes
2 answers

Rails: ActiveAdmin custom filter returning errors

I am trying to setup a custom filter with my ActiveAdmin installation and it is returning some errors. User Model: class User < AR::Base has_many :gpas def current_gpa return nil if gpas.blank? @current_gpa ||= (gpas.where(year:…
dennismonsewicz
  • 25,132
  • 33
  • 116
  • 189
0
votes
1 answer

Active Admin Custom Join Table for Filter

I am using Active Admin with metasearch. I have a habtm relationship but the join table is not the default one. I have class Person < ActiveRecord::Base has_and_belongs_to_many :events, :join_table => 'events_staff' end class Event <…
chris
  • 6,653
  • 6
  • 41
  • 54
0
votes
1 answer

How to get form action WITH PARAMS with jQuery?

Let's me explain a little. The goal is to save urls in history state when form submitted. Form has get method and remote submit. If I try to get action via attr method it's always be static. But when I submit the form url looks like…
Meliborn
  • 6,495
  • 6
  • 34
  • 53
0
votes
1 answer

Rails meta-search: Check if filter is set

Is it possible to check if a filter on a search-object from the rails gem meta-search is set? I've got this code in my controller: @search = Tree.search(params[:search]) when i do @search.search_attributes.empty? i got true if i the form never has…
secador de pelo
  • 687
  • 5
  • 26
0
votes
1 answer

Rails MetaSearch Associations Undefined Method

I am working with a rails app and have begun to work on a search function using metasearch but I am having troubles getting the correct method for the search. For example I have a model (Proposal) that has a field cost. ..model/proposal.rb class…
JamesWatling
  • 1,175
  • 1
  • 9
  • 17
0
votes
1 answer

meta_search with meta_where gem

I'm using meta_search and meta_where gem.In my controller file: @search = Project.where('end <= ?', Time.zone.now) @search = @search.search(params[:search]) When I run this code I have error in browser like this PG::Error: ERROR: syntax error at…
James Fox
  • 27
  • 1
  • 1
  • 4
0
votes
1 answer

changing meta search parameters

Index action @search = Project.search(params[:search]) @projects = @search.order('created_at desc').paginate(:page => params[:page], :per_page => 100) @total_projects = Project.count respond_to do |format| format.html format.mobile …
James Fox
  • 27
  • 1
  • 1
  • 4
0
votes
1 answer

keep meta_search parameters for edit page?

I'm using meta_search gem.I have url like this for admin projects index page with search parameters. admin/projects?utf8=✓&search%5Bid_equals%5D=&search%5Btitle_contains%5D=&search%5Bstage_in%5D=completed Then user choose one project and url will…
James Fox
  • 27
  • 1
  • 1
  • 4
0
votes
1 answer

How can I include more fields to where condition using ransack?

I'm building a query using ransack predicates, so that means I need a lot of conditions for a WHERE clause SQL-wise. Here's what I have as a Hash of conditions for ransanck's search method: This is the console output of…
jlstr
  • 2,986
  • 6
  • 43
  • 60
0
votes
1 answer

Active admin "AND" filter with check boxes

I have simple active admin filter in my Parent resource: filter :child_id, :as => :check_boxes, :collection => proc { Child.all } filter :child_id_not, :as => :check_boxes, :collection => proc { Child.all } I want to get all Parent resources that…
Dave
  • 463
  • 1
  • 3
  • 14