Reputation: 1246
I am new to rails.I am building my first application. I have to put the following lines in init.rb file:
#in init.rb
require ‘active_record’
require ‘simple_search’
ActiveRecord::Base.send(:extend, SimpleSearch::ClassMethods)
could you tell me what is the location of init.rb file.
Upvotes: 1
Views: 2168
Reputation: 6426
You can put it in config/environment/init.rb
or config/initializers/init.rb
Upvotes: 1
Reputation: 5416
You need to the add the above lines to vendor/plugins/simply_searchable/init.rb
https://gist.github.com/362823
Restart the server for the changes to take effect.
Upvotes: 2