Browse files

Allow, once again, to bind anything that is convertable to NS=>NS

  • Loading branch information...
1 parent b2a5635 commit c74333a79422530fc7f13f8283bfdba37b1900eb @nafg nafg committed Sep 19, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 core/util/src/main/scala/net/liftweb/util/CssSel.scala
View
6 core/util/src/main/scala/net/liftweb/util/CssSel.scala
@@ -785,8 +785,8 @@ object ComputeTransformRules {
def computeTransform(param: => T, ns: NodeSeq): Seq[NodeSeq] = List(f(param))
}
- implicit def nodeSeqFuncTransform: ComputeTransformRules[NodeSeq => NodeSeq] = new ComputeTransformRules[NodeSeq => NodeSeq] {
- def computeTransform(func: => NodeSeq => NodeSeq, ns: NodeSeq): Seq[NodeSeq] = List(func(ns))
+ implicit def nodeSeqFuncTransform[A](implicit view: A => NodeSeq => NodeSeq): ComputeTransformRules[A] = new ComputeTransformRules[A] {
+ def computeTransform(func: =>A, ns: NodeSeq): Seq[NodeSeq] = List(view(func)(ns))
}
implicit def nodeSeqSeqFuncTransform: ComputeTransformRules[NodeSeq => Seq[Node]] = new ComputeTransformRules[NodeSeq => Seq[Node]] {
@@ -908,4 +908,4 @@ final case class ToCssBindPromoter(stringSelector: Box[String], css: Box[CssSele
* @return the function that will transform an incoming DOM based on the transform rules
*/
def replaceWith[T](it: => T)(implicit computer: ComputeTransformRules[T]): CssSel = this.#>(it)(computer)
-}
+}

1 comment on commit c74333a

@fmpwizard
Lift Web Framework member

+1

Please sign in to comment.