From: Jacob Burkhart Date: 2008-04-01T07:27:09+09:00 Subject: Suggest alternatives for Facets paramix? ------=_Part_856_18182408.1207002423149 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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? Anybody get what I'm talking about? Why get rid of such a useful thing? What's a good alternative? I debate making my own such thing, something like: include_mod SqlSearch, :on => ['name', 'content'] and then the callback is self.mod_included(base)... feels hackity Any thoughts? Jacob ------=_Part_856_18182408.1207002423149--