This named scope is working fine.

```
named_scope :search, lambda {|search_txt|
      {
        :conditions => ["field1 like ? or field2 like ? or field3 like ?","#{search_txt}%","#{search_txt}%","#{search_txt}%"]
      }
  }

```

Instead of writing search\_txt three time in conditions. Can I handle the same scenario with passing search\_txt only once in conditions ?

Something like

```
named_scope :search, lambda {|search_txt|
      {
        :conditions => ["field1 like ? or field2 like ? or field3 like ?","#{search_txt}%"]
      }

```

}