------art_883_16722520.1207594235247
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hey Tran,

Thanks for re-adding Paramix to facets!
I seem to be getting a conflict with another thing called Delegator in
class_eval.

So this seems to work better:

  def self.append_features(base)
    base.modspace.module_eval %{
      def #{base.basename.to_s}(parameters, &block)
        Paramix::Delegator.new(#{base}, parameters, &block)
      end
    }
  end


and I also had to change the order of things in append_features so that the
include is last, because I want to be able to reference mixin_parameters in
self.included:


    def append_features(base)
      base.mixin_parameters[delegate_module]  arameters

      base.module_eval do
        define_method(:mixin_parameters) do
          base.mixin_parameters
        end
      end

      base.__send__(:include, delegate_module)

      base.module_eval(&@base_block) if base_block
    end

Can we get these changes in the next version of facets?

thanks,
Jacob

On Mon, Mar 31, 2008 at 9:25 PM, ara.t.howard <ara.t.howard / gmail.com>
wrote:

>
> On Mar 31, 2008, at 4:27 PM, Jacob Burkhart wrote:
>
> > But all of that takes a fair amount of up-front class_eval to add the
> > make_resourceful class method to everything.
> >
>
> ??
>
> module SqlSearch
>
>  def SqlSearch.bless other, options  }
>    stuff_with options
>    other.send :include, self
>  end
>
> end
>
> class Module
>  def sqlsearch options  }
>    SqlSearch.bless self, options
>  end
> end
>
> a @ http://codeforpeople.com/
> --
> we can deny everything, except that we have the possibility of being
> better. simply reflect on that.
> h.h. the 14th dalai lama
>
>
>
>
>

------art_883_16722520.1207594235247--