Displaying 5 results from an estimated 5 matches for "sales_order".
2007 Apr 04
4
Order a find using a has_many association
I''m trying to order a find through a has_many association. I have a
model called SalesOrder. Each sales order has things like amount,
description, etc. I use the following to get the Sales Orders:
@sales_orders = SalesOrder.find(:all)
And I display them with:
<td><%= link_to sales_order.id.to_s, :action => ''show'', :id =>
sales_order.id %></td>
<td><%= sales_order.sold_to %></td>
<td><%= sales_order.ship_to %></td>
<td>&...
2007 Mar 22
2
Inconsistent Invalid Argument Error
...ontains sortable links as headings.
Here is the code used to create these sortable links in the
application_helper:
module ApplicationHelper
def sort_link_helper(text, param)
key = param
key += "_reverse" if @params[:sort] == param
link_to(text, :controller => ''sales_orders'', :action => ''list'',
:sort => key )
end
end
Here is the code in my controller where I call the sort_link_helper
function:
<tr>
<th><%= sort_link_helper ''Number'', ''id'' %></th>
&l...
2008 Feb 07
4
text_field_with_auto_complete
I have the following in my view:
<% form_tag :action => ''detail'' do %>
Search for Sales Order Number:<br />
<%= text_field_with_auto_complete :sales_order, :id %>
<%= submit_tag " Go "%>
<% end %>
And I have the following in my controller:
auto_complete_for :sales_order, :id
This worked fine in 1.5, but now that I''ve upgraded to Rails 2.0.2, and
installed the auto_complete plugin, it doesn'...
2006 May 03
5
Finding the rhyme for has_many :through
Hi all,
I am NOT a person with English as my mother language and I haven''t been
programming long enough to be natural in these kind of things. And if
that isn''t bad enough, I am a newbie on Rails too... So 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
2009 Oct 29
4
manipulating form
Hi,
I work with forms and i won''t to set a name for a form to use
javascript functions..
How can i do
Thanks