search for: purchaseorder

Displaying 5 results from an estimated 5 matches for "purchaseorder".

2006 Jun 01
4
can''t convert Fixnum into String ??
I have been getting this error message on various pages, just wondering if anyone could explain whats going wrong, and the best way to correct it code that is cuasing the problem is below @project = Project.find(:first, :conditions => "id = " + @purchaseorder.project_id) -- Posted via http://www.ruby-forum.com/.
2006 May 12
4
default value in text field
hi, This should be really simple, but i cant seem to find the answer anywhere!! In my _form.rhtml I have the following text field, how can I define a default value? <%= text_field ''purchaseorder'', ''number'' %> -- Posted via http://www.ruby-forum.com/.
2009 Apr 21
0
Validate order lines on order creation (ActiveResource)
Hello, I have order model that has many lines. I would like to create order only when all order lines will be created: require ''rubygems'' require ''activeresource'' class PurchaseOrder < ActiveResource::Base self.site = "http://admin:secret@localhost:23456" end o = PurchaseOrder.create(:account_ref => ''123'', :lines => [{ :code => "111" }, {:code => "222"}]) puts o.inspect If I add validation that code has to be &lt...
2008 Nov 06
3
Verifying some understanding about manipulating DB data in before/after callbacks in RSpec
We had an after(:each) callback that looked like this: PurchaseOrder.find(:all).each {|po| DraftInvoice.find_all_by_po_number(po.po_number).each {|di| di.destroy}} which we were hoping would reset some purchase order data in a certain way. However, because we have "self.use_transactional_fixtures = true" set in test_helper.rb, this code was never getti...
2012 Apr 25
2
Rails 3.1 - Scaffolding Files
Where can I find more information about the new syntax on these: <%- model_class = @product.class -%> <h1><%=t ''.title'', :default => t(''helpers.titles.new'', :model => model_class.model_name.human, :default => "New #{model_class.model_name.human}") %></h1> <%= render :partial =>