Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (16 sloc) 550 Bytes

Mysql Simple Fulltext

MysqlSimpleFulltext lets you make simple MySQL fulltext searches a simple way without writing SQL queries in your ActiveRecord.

Getting started

gem install mysql_simple_fulltext

In your Gemfile

gem "mysql_simple_fulltext"

In your model

Setup your fulltext search

class Post < ActiveRecord::Base
  search_with_simple_fulltext [:title, :content]

Generate your migration file

rails generate mysql_symple_fulltext:migration Post

rake db:migrate

Search !

Post.fulltext_search("Lorem Ipsum")
Something went wrong with that request. Please try again.