Displaying 7 results from an estimated 7 matches for "componentlogs".
Did you mean:
componentlog
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=> &qu...
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...
2006 Jan 16
8
AJAX + Table.
...gt;
<br />
<table id="results">
<tr>
<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 %></t...
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 =&g...
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 =>
2006 Mar 08
4
unless connected? + multiple databases
Hello all.
I am still having fun with multiple databases. In this case it is the
unless connected? statement.
ActiveRecord::Base establishes a connection that is inherited by the
majority of my models. However one Model (Componentlog) that uses a
separate DB is coded as:
unless Componentlog.connected?
establish_connection(
:adapter => "oci",
:database =>
2006 Mar 14
2
How to not display :id in link_to URL
Hello all.
I have a page which has a form on it. the page''s URL is
http://127.0.0.1:3000/Component/history and The form action is:
<%= start_form_tag :action => :history %>
<%= text_field_tag ''id'', "#{session[:component_criteria]}" || nil,
:class => ''mandatory'' %><br />
<%= submit_tag "Search", :class