From: Trans Date: 2008-04-08T04:44:54+09:00 Subject: Re: Suggest alternatives for Facets paramix? On Apr 7, 2:50 pm, "Jacob Burkhart" wrote: > 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 Ah, good catch, I will fix. > 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] = parameters > > 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 Yep. I ran into that too and have already made that change. > Can we get these changes in the next version of facets? Yep. And I will be releasing 2.4.2 in a matter of days. Thanks Jacob, T.