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
21
votes
5 answers

How to filter IS NULL in ActiveAdmin?

I've a table with an integer column called "map_id", I want to add an activeadmin filter to filter if this column IS NULL or IS NOT NULL. How could this be implemented ? I tried the following filter filter :map_id, :label => 'Assigned', :as =>…
15
votes
5 answers

Meta Search Engine Architecture

The question wasn't clear enough, I think; here's an updated straight to the point question: What are the common architectures used in building a meta search engine and is there any libraries available to build that type of search engine? I'm…
Loki
  • 29,950
  • 9
  • 48
  • 62
9
votes
2 answers

Rails meta_search gem: sort by count of an associated model

I'm using meta_search to sort columns in a table. One of my table columns is a count of the associated records for a particular model. Basically it's this: class Shop < ActiveRecord::Base has_many :inventory_records def…
jfeust
  • 845
  • 1
  • 9
  • 19
9
votes
2 answers

Filter by string instead of select in ActiveAdmin

I have belongs_to and has_many assotiations between two models. By default, activeadmin using select input for it. But in my case, it's imposible - because I have a thousands items. When I trying change filter to filter :item, as: :string it says…
Meliborn
  • 6,495
  • 6
  • 34
  • 53
7
votes
1 answer

How can I select a SUM in a query using Rails 3 / MetaSearch?

I have a Rails 3 application where my model includes Owners and Properties, each Owner representing a person or institution that owns one or more properties. I would like to be able to search my database (SQLite3) and return the results grouped by…
KTY
  • 71
  • 1
  • 1
  • 2
6
votes
1 answer

Integrating meta_search gem in index with existing geocoder gem search (rails)

I have already implemented a location based search using geocoder and am having trouble integrating the meta_search gem. I'm trying to integrate meta_search into my object_controller index to allow users to filter and sort search results by an…
Will Dennis
  • 1,045
  • 1
  • 10
  • 12
6
votes
2 answers

ActiveRecord is not missing constant Base! error deploying rails 3.2.9 jruby 1.7.2 to weblogic 10.3

Running into this issue while deploying Rails 3.2 project to Weblogic 10.3 and was looking for an easy answer. org.jruby.exceptions.RaiseException: (NameError) ActiveRecord is not missing constant Base! at…
Jeff Ancel
  • 3,076
  • 3
  • 32
  • 39
5
votes
1 answer

How can I use scopes with Ransack in Rails 3?

In my Widget model I have the following: scope :accessible_to, lambda { |user| if user.has_role?('admin') self.all else roles = user.roles role_ids = [] roles.each { |r| role_ids << r.id } …
jklina
  • 3,407
  • 27
  • 42
5
votes
3 answers

Rails - How to not evaluate a field in a Ransack search form

I am using the Ransack Gem in Rails 3.1. Everything works as expected. However, I have a search form that will look up a person using a Soundex column that I am having an issue with. In my form I have a "given_name_soundex_cont" field, that a user…
Oscar
  • 3,218
  • 2
  • 26
  • 26
5
votes
2 answers

Combining meta_search with acts_as_taggable_on

I've run into a small problem with some search-functionality for a Rails 3 website I'm developing. I have a simple Post model that looks like this: class Post < ActiveRecord::Base acts_as_taggable end I'm using acts_as_taggable_on to make adding…
RobinBrouwer
  • 973
  • 6
  • 13
5
votes
1 answer

"No valid predicate" error when upgraded from Meta_search to Ransack?

I've got an ActiveRecord model with a method defined like this: def state if deleted? :deleted else :expired end end The 'search_method' is defined in the model as: search_method :state In the view: = form.select :state, {…
5
votes
2 answers

Active Admin custom filter. Filter date by day | month | year of a Date attribute

I have a Model with :birthday attribute and I want to filter out those dates by month specified in the form (ActiveAdmin's DSL :select). This is an example of simple scope that extract only the month of birthday's date. Maybe can help: scope…
Theo B
  • 351
  • 1
  • 3
  • 12
5
votes
4 answers

Setting up a has_many through filter with Active Admin

I'm trying to simply allow filtering of categories on the Locations page for ActiveAdmin. I have three models: class Location < ActiveRecord::Base has_many :categories_locations has_many :categories, :through => :categories_locations class…
Brian Weinreich
  • 7,692
  • 8
  • 35
  • 59
4
votes
3 answers

rails default sort using MetaSearch

I am using the gem metasearch to provide some sorting features. The page is defaulting to a sort of created_at ASC, but I want it to be created_at DESC, but I can't explicitly state that because it will override MetaSearch's sort features. def…
Tony Beninate
  • 1,926
  • 1
  • 24
  • 44
4
votes
2 answers

rails error in form because of utf8=✓ with meta search

I have an issue in a search form with meta search : When I submit my search form (method get) I have a 500 error because of the utf8=✓ param added by rails. http://localhost:3000/items?utf8=✓&search[brand_contains]=levi If I delete the check mark…
guts
  • 381
  • 1
  • 9
  • 22
1
2 3 4 5 6 7 8