Your browser (Internet Explorer 6) is out of date. It has known security flaws and may not display all features of this and other websites. Learn how to update your browser.
X

Archive for February, 2011

ActiveRecord callbacks and destructive methods

Recently I added search functionality to my application. I implemented a search controller and model. An issue I faced was manipulating the search keywords entered by the user so the search query worked properly. I ended up doing the following: search.rb class Search < ActiveRecord::Base belongs_to :user attr_accessible :keywords, :category, :user   validates_presence_of :keywords   [...]