search for: find_without_destroyed_scope

Displaying 1 result from an estimated 1 matches for "find_without_destroyed_scope".

2007 Apr 12
0
Does Ferret have problems with #alias_method_chain ?
...ferret :store_class_name => true, :remote => true, :fields => (self.content_columns.map(&:name) rescue []) + %w(main_identifier) class << self # #count is also defined, omitted for clarity def find_with_destroyed_scope(*args) with_destroyed_scope do find_without_destroyed_scope(*args) end end alias_method_chain :find, :destroyed_scope def with_destroyed_scope(&block) raise "Called without a block" unless block_given? with_scope(:find => {:conditions => "destroyed_at IS NULL"}) do yield end end...