Hi,

just tried it out and it works for me without any issue...

I ve changed the following:
ActiveScaffold::Finder::StringComparators[:not_contains] = 'not%?%'

Override Method in one of my controllers:
def self.condition_for_range(column, value, like_pattern = nil)
    if !value.is_a?(Hash)
      if column.column.nil? || column.column.text?
        ["#{column.search_sql}
#{ActiveScaffold::Finder.like_operator} ?", like_pattern.sub('?',
value)]
      else
        ["#{column.search_sql} = ?", column.column.type_cast(value)]
      end
    elsif value[:from].blank?
      nil
    elsif ActiveScaffold::Finder::StringComparators.values.include?
(value[:opt])
      if value[:opt] ==
ActiveScaffold::Finder::StringComparators[:not_contains]
        ["#{column.search_sql} NOT LIKE ?", value[:opt]
[3..value[:opt].length].sub('?', value[:from])]
      else
        ["#{column.search_sql} LIKE ?", value[:opt].sub('?',
value[:from])]
      end
    elsif value[:opt] == 'BETWEEN'
      ["#{column.search_sql} BETWEEN ? AND ?", value[:from],
value[:to]]
    elsif ActiveScaffold::Finder::NumericComparators.include?
(value[:opt])
      ["#{column.search_sql} #{value[:opt]} ?", value[:from]]
    else
      nil
    end
  end



On Jun 16, 9:23 pm, lmorris99 <[email protected]> wrote:
> Thanks Volker, but after two hours of looking at things in the debugger and
> trying to trace it through, I give up.
> If anybody else wants to give active_scaffold a "DOES NOT CONTAIN" feature,
> please feel free to contact me.

-- 
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/activescaffold?hl=en.

Reply via email to