search for: cl_compname

Displaying 6 results from an estimated 6 matches for "cl_compname".

2006 Jan 18
5
Exception not caught?
Hello all. I have started reading up on exceptions and tried replacing a manual check with one. Given the following code: def results begin @componentlogs = Componentlog.find(:all, :conditions => [ "cl_compname = ?", params[:componentlog][:cl_compname].strip] ) rescue ActiveRecord::RecordNotFound render_text "<p class=''center''>No matches found</p>" else render :partial=> "componentlog" end end If I searched for a nonexist...
2006 Jan 26
1
Help constructing a find_by_sql command
Hello all. I am trying to do the equivalent of: @componentlogs = Componentlog.find(:all, :conditions => [ "cl_compname like ?", @criteria ], :offset => offset, :limit => items_per_page, :order => "cl_spr DESC" ) in a find_by_sql statement. I cannot use the build in because the adaptor isn''t quite right (OCI8) When I use it I get the following error OCIError: ORA-00907: missing r...
2006 Jan 25
4
Cannot :order when using :offset and :limit in find
Hello all. I am using the Paginate_with_ajax code as described on the wiki but I am running into the following problem. The following code will work fine and retrieved unsorted records in a hunky dory fashion: @componentlogs = Componentlog.find(:all, :conditions => [ "cl_compname like ?", @criteria ], :offset => offset, :limit => items_per_page ) However if I try and add an order... @componentlogs = Componentlog.find(:all, :conditions => [ "cl_compname like ?", @criteria ], :offset => offset, :limit => items_per_page, :order => "cl_sp...
2006 Feb 20
1
Form linking question
Hello all. I currently have a method that is accessed from a form using this: View: <%= start_form_tag :action => :history %> <p><label for="componentlog_cl_compname">Component Name</label><br /> <%= text_field ''componentlog'', ''cl_compname'', :class => ''mandatory'', :value => "#{session[:criteria]}" || nil %></p> <%= submit_tag "Search", :class =&...
2006 Mar 14
2
How to not display :id in link_to URL
...URL with fields further down the page populated based on the params[:id] submitted with the form. (My controller does different things based on request.get?) All this works groovily. If, however, I try and link to this page from another page using: <td><%= link_to "#{componentlog.cl_compname}", { :controller => ''component'', :action => ''history'', :id => componentlog.cl_compname}, :post => true %></td> The page is loaded with the following URL: http://127.0.0.1:3000/Component/history/ComponentName Then any future searches...
2006 Jan 16
8
AJAX + Table.
...<th>SPR Number</th> <th>Developer</th> <th>Origin</th> <th>Date</th> <th>Status</th> </tr> </table> CONTROLLER FUNCTION def results @componentlogs = Componentlog.find_by_compname(params[:componentlog][:cl_compname]).reverse render :partial=> "componentlog", :collection => @componentlogs end PARTIAL FORM <tr> <td><%=h componentlog.cl_spr %></td> <td><%=h componentlog.cl_user %></td> <td><%=h componentlog.cl_fromarea %></td> &l...