similar to: Exception not caught?

Displaying 20 results from an estimated 2000 matches similar to: "Exception not caught?"

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
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
2006 Jan 16
8
AJAX + Table.
Hello all. I am trying ot load table rows using AJAX based on a search. The following code results in: 1. Firefox renders correctly (Multiple rows inserted into page). 2. Opera renders the entire returned string in one <td> by the looks of it (Bunched up under first header, the <> tags arne''t visible) 3. IE6 does nothing....great ;) This is driving me nuts so any help
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 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
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 =>
2007 Dec 03
5
spec for model_id should eql
Hello, I''m confused why the spec described below is failing. Other simple comparison specs are passing fine for the same model. The code is working accordingly when I test it through the console, I''m just having difficulty getting this spec to work. Any pointers would be appreciated. Failure message: ''Address fetch and geocode should extract department and write to
2005 Dec 21
8
text_area
Hi I''d like to know how to add default text text area using the function text_area. I ''ve tried using value = "....." to do this but with no luck. Could some one please answer my simple question? Thanks. Dan. -- Posted via http://www.ruby-forum.com/.
2007 Dec 04
12
params not available for controller specs?
Hi, all, I''m trying to write a spec for a controller method that starts out: def download @orders = Order.find( params[:ids] ) ... and started writing a spec that set params[:ids] to a mock. I was surprised to discover that controller specs (at least in RSpec 1.0.8) don''t offer the use of the params object (per
2006 Jan 15
4
file_field vs. file_field_tag
Hi, The documentation doesn''t make it clear why both file_field and file_field_tag are both useful. What is the reason for having two instead of just one of these? Thanks, Peter
2005 Mar 21
3
routes.rb question.
I have a simple program that read all HTML files from a directory and returns parts of the content and the file names which are HREFs to those file. I build the HREF string dynamicaly as PATH_TO_DOC_ROOT + "file_name". My PATH_TO_DOC_ROOT = http://127.0.0.1:3000/docman/public/docs. So, the final link that I am interested in might look like this:
2005 Apr 20
7
find_all_by and :order
I think I must be missing something obvious... I have... class OrderController < ApplicationController model :order scaffold :order def list @orders = Order.find_all_by_status(@params[:status], :order => "date" ) end end class Order < ActiveRecord::Base belongs_to :customer end and i''m getting... /Unknown column ''orderdate'' in
2007 Sep 13
2
Failing to raise an exception in a stub
I''ve come across rather strange behaviour when trying to raise an exception in a stubbed method. I''m speccing the behaviour of a Rails create action, where I''m using save! to catch failed saves. In the case of working save, I''m using the following stub: @client.stub!(:save!).and_return(true) which works fine. However, in the negative case,
2005 Mar 10
6
Expiring Cache Fragments and fcgi
First let me say that Rails caching is very very cool. The traffic (and responsiveness) I''ve saved by added 10 lines of ruby code would be enourmous, if I actually had traffic... ;) Sweepers as observers are great, btw. Since every page of my side is dynamic, once I did some DB optimization I''m caching the content of the index page which was taking the bulk of the time to load
2007 Dec 13
8
stub with assigns?
is there a way to stub a method that sets an instance variable, so the stub sets it too? def find_foo @foo = Foo.find(params[:id] end ... controller.stub!(:find_foo).and_assigns(:foo, "123") -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-users/attachments/20071213/2042719f/attachment.html
2008 May 03
6
Everyone Using Rspec Autotest?
I haven''t been spec''ing lately, but been hopping back on and adding autotest. However I get an error: http://pastie.caboo.se/177538/wrap I also noticed a post by Scott and there was mention of rspec_autotest. Is this is what everyone is using? http://svn.caldersphere.net/svn/main/plugins/rspec_autotest/
2006 Jan 09
3
rails ignoring the migration file
I have a mysql database that I am trying to use migrations on. The problem that I am having is that when I create a blob field in my migration file like so: t.column "data", :binary, :limit => 15.megabytes, :null => false rails changes it to this in the schema: t.column "data", :binary, :default => "", :null => false not only is this not what I wanted
2005 Feb 15
5
date_select where to add "class"=>"something"
Hi, I''ve looked on api.rubyonrails.org but I''ve not found how to add to a date_select(object, method, options = {}) a class option to set the class of all the select tags. I''ve tried using "class" => "myclass" in thoose ways: <%= date_select("costo", "data", "class" => "testo" ) %> <%=
2005 Dec 21
5
text search engine ?
Hi there, What are you using for text search engine in your rails applications ? I have been using simple search for simple applications, but then I need to search text in model instances inside collections such as user.documents and the like. I believe that simple search does not support any sort of ranged queries, and sql like might be overkill for tables with lots of records. Bests, Sergi
2005 Mar 10
8
Login controller additions
I have added roles and roles_users table and updated the model so that my users can have multiple roles. ("Admin" role does always have id = 1). I have added these methods to my application controller. <code> helper_method :is_admin? helper_method :is_user? def is_admin? if @session[''user''] @session[''user''].roles.find(1)