search for: destroyed_at

Displaying 3 results from an estimated 3 matches for "destroyed_at".

2007 Apr 12
0
Does Ferret have problems with #alias_method_chain ?
...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 end end When I start the Ferret server and subsequently query it, I always get a stack level too deep exception. The error is caused by having the redefined #find called twice. The only way I can prevent that error from occuring is by guarding...
2005 Sep 26
1
[Fwd: [Rails] Re: Autocomplete - setting a second value?]
...id="s<%= supplier.id %>"><%= h(supplier.display_name) %></li> app/controllers/products_controller.rb: def auto_complete_for_supplier_name name = "%#{params[:supplier][:name].downcase}%" conditions = [] values = [] conditions << ''destroyed_at is null'' conditions << ''supplier = 1'' conditions << ''(company_name LIKE ? OR last_name LIKE ? OR first_name LIKE ?)'' 3.times { values << name } @suppliers = Party.find(:all, :limit => 15, :conditions => [conditi...
2005 Sep 22
6
Autocomplete - setting a second value?
I''m using the autocomplete function, and need a way to grab a second value from the ajax request... an example would probably speak better: This is my HTML: <input name="CustomerName" id="CustomerName" type="text" /> <div id="CustomerList"></div> <input name="CustomerID" id="CustomerID"