Displaying 8 results from an estimated 8 matches for "supplier_id".
2006 Mar 18
3
Nil result on find & pretty print
...Ruby and to Ruby on Rails and have spent the last few days
trying to get my head around it. I think I am already hooked but am
suffering badly from years of programming a non-OO RDBMS. I am trying
to learn by attempting to produce a system for my work.
I have a main table sdocs which has a field supplier_id which is an
entry in another table (suppliers) to lookup supplier name etc. At the
moment I am not using the id field of suppliers in an attempt to get
around the following error. (The agile development book suggests that
the nil error only results from a search on a key and not from a search
on...
2007 Jun 24
4
IO Error when querying on a single field
I''m getting an exception when I query a large index (4GB, ~700K docs)
on a particular field.
For example:
supplier_id:77490
IO Error occured at <except.c>:93 in xraise (IOError)
Error occured in fs_store.c:293 - fsi_seek_i
seeking pos -1515676213: <Invalid argument>
Anecdotally it seems to happen for supplier_ids > 76900.
Here is the field info for that field:
supplier_id:
index: yes...
2006 Mar 13
8
Nested find(:all, :include => ) statements
Is there a way for me to do:
OrderItem.find(:all, :include => [:user, :product => [:supplier]]
So I don''t have a supplier_id on my order_item, but have it on my
product, which is part of order_item.
Joerg
--
Posted via http://www.ruby-forum.com/.
2006 May 03
5
Finding the rhyme for has_many :through
...please enligthen.
I am trying to build a simple tool for my shop. I have many products
that I sell in my shop and of course I have many suppliers for the
products. Thus to express the relationship between products and
suppliers, I think I have to create a join model. Beside the product_id
and supplier_id the join model will also note the purchase_date, the
quantity, and the price. Am I right till this point? The question is,
what shall I name the join model? Please remember that I don''t use
English daily.
I am looking for a word that rhyme. Rails Recipes book gives a very nice
example...
2005 Sep 26
1
[Fwd: [Rails] Re: Autocomplete - setting a second value?]
..., exactly. You can get the latest version at
http://dev.rubyonrails.com/browser/spinoffs/scriptaculous/
> ... and if so, would it be possible for you to show some code so I can
> see how you exactly do it?
Sure, no problem.
app/views/products/_form.rhtml:
<%= hidden_field :product, :supplier_id %>
<%= text_field :supplier, :name, :size => 40, :value =>
@product.supplier.nil? ? nil : @product.supplier.display_name %>
<div class="auto_complete" id="supplier_name_auto_complete"/>
<script type="text/javascript">
new Ajax.Autocomplete...
2007 Nov 05
6
Strange wildcard problem
...f simplicity) models, both of
which are indexed on a similar (but separate) non-model field.
However, one of those two models does not seem to get the proper
number of results for a wildcard search:
First of all, there''s a non-indexed model called ProductTuple that''s
got a supplier_id as well as a product_category_id and
product_material_id as well as some other id fields that aren''t really
important here. Thus, a ProductTuple has foreign key relationships to
Suppliers and ProductCategories and ProductMaterials, but for ferret
purposes just think of those foreig...
2007 Aug 05
1
IO Errors on deleting documents with Ferret
I have a large index (~6GB, ~1 million docs) that was built by RDig.
I wrote a script to iterate through the index to clear out some
duplicate information to try to reduce the size of the index.
clients.each {|client|
docs = RDig.searcher.search("+supplier_id:#{client.id}")
docs.each {|doc|
data = doc[:data].dup #the contents of the web page
new_results = {}
new_results[:client_id] = client.id
new_results[:data] = data
index.delete doc[:doc_id]
index << ne...
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"