Questions tagged [ransack]

Ransack is a Ruby gem that enables object-based searching against an application's models.

Ransack enables the creation of both simple and advanced search forms against an application's models.

It is a rewrite of MetaSearch, though while it supports many of the same features as MetaSearch, its underlying implementation differs greatly from MetaSearch, and backwards compatibility is not a design goal.

The Ransack Github repository is https://github.com/activerecord-hackery/ransack#readme

759 questions
0
votes
1 answer

Converting an array of data-objects to raw data

This is probably a huge oversight on my part, but I have been searching for a fix for about an hour now, with no luck! I am following the RailsCast tutorial on exporting data to .CSV The data I am using to populate the CSV is coming from a Ransack…
briankulp
  • 186
  • 1
  • 11
0
votes
2 answers

using autocomplete in app with ransack

Good day. I hame a controller that uses ransack to find articles by their title. I need field that's used for finding info to use autocomplete. Currently it finds alright, but no autocomplete, could you assist me in that problem and gem…
0
votes
2 answers

Ruby on Rails: Ransack undefined method `result`

I'm new to ROR, so this could be a very simple problem. I have just installed the ransack gem for my web application. I am wanting to search on project names and clients in my database. I have an index page view, which I use for my homepage, then a…
Jazz
  • 1,090
  • 6
  • 23
  • 55
0
votes
1 answer

How to implement the search text data in attached files in rails application

I have a requirement to search the text data in an attached file. I am currently using carrierwave for attachment and ransack for searching. Is this feature available with what I am using? Or is there another way to satisfy my requirement?
Raju akula
  • 1,255
  • 1
  • 13
  • 18
-1
votes
1 answer

Why Ransack doesn't show any search results

I refer to the official teaching and also read all the similar Q&A on Stackoverflow, but I am not using Pagy and AJAX, so it is not the same error. I'm trying to search for the value of the name column on Task model. But when I enter a keyword that…
Init
  • 3
  • 5
-1
votes
1 answer

How to avoid SQL Injection in Rails with Ransack

How can we remove SQL blind injection in the following method? def self.with_translation_value_of_language_id_eq(language_id) joins('LEFT JOIN BOTranslationValue on BOTranslationToken.id = BOTranslationValue.boTranslationTokenID '\ …
-1
votes
2 answers

Rails how do I search in the first and second part of a string in the database?

For my application I want to build a search form that gives back the name of the streets. But when I use where('street like ?', 'wall') it only returns: 'Wallstreet' and not for example: 'Second Wallstreet, The Wallstreet' I want to return also the…
Bart Hoekstra
  • 5,814
  • 1
  • 15
  • 13
-2
votes
1 answer

ROR + Ransack: Rendering selected search parameters

I am trying to render the strings of the search parameters passed to the ransack search. However, i can't figure a way of detecting if a specific attribute was included in the search. Below code works but will not hide the button if the param is…
doyz
  • 887
  • 2
  • 18
  • 43
-4
votes
1 answer

How to generate PDF based on search using prawn in ruby on rails?

What I Would like to achieve is that Document that is generated in PDF should be based on search engine. I used ransack as the tool in order to do searching criteria. I can generate the document in PDF with code below but it generates the whole…
PONCY
  • 11
  • 1
  • 6
1 2 3
50
51