1 Apr 2008 01:34
Re: Suggest alternatives for Facets paramix?
Trans <transfire <at> gmail.com>
2008-03-31 23:34:01 GMT
2008-03-31 23:34:01 GMT
On Mar 31, 6:27 pm, "Jacob Burkhart" <igoti... <at> gmail.com> wrote: > I Can't seem to find any documentation or explanation as to why paramix has > been forcibly deprecated from facets:http://facets.rubyforge.org/doc/changes.html > > And apparently that lack of documentation means not too many other people > were making use of this cool tool. > > You see a similar technique used a lot in rails. For example, you'll add > the make_resourceful plugin and now all of your controller have the class > method make_resourceful. (And that takes some arguments) And when you call > it ends up including some module from the plugin that adds things to your > controller. great. > > But all of that takes a fair amount of up-front class_eval to add the > make_resourceful class method to everything. > > For simple add-ons I like to use paramix. > > For example, I have a simple module called SqlSearch, and I do > > include SqlSearch, :on => ['name', 'content'] > > paramix gives me access to those hash parameters in my self.included(base) > call in the module. So much simpler and cleaner than declaring class method > everywhere, and there's a clear and definite association here. You KNOW to > look for a SqlSearch module to find out what's going on I could instead > have defined the sql_search class method on ActiveRecord::Base... but then > I have to have require 'sql_search', I can't just have the const_missing > SqlSearch trigger the load needed.... messiness?(Continue reading)
RSS Feed