similar to: manging rescues

Displaying 20 results from an estimated 700 matches similar to: "manging rescues"

2007 Apr 19
4
render_to_string in a model ?
I have a batch job that will call script/runner, I would like in this call to create html formated email and save it to the database. This is easy enough in a controller with yournewhost.email = render_to_string :action => "email_newhost_ready", :layout => false But render_to_string is only available in controller action pack, is there a easy way to render_to_string in a Model? Or
2007 Jun 27
5
Regexp not matched
Sorry, meant to post this in the rails forum. Anyways, how would I write a rescue method to recover from a failed regexp parsing with error "regexp not matched" -Thanks -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post
2007 Jul 07
6
Help in upgrading from 1.1.6 to 1.2.3
Hi, I was developing a rails app with version 1.1.6 that just worked fine. I decided to upgrade to 1.2.3 and then, I keep getting that horrible message: "Application error Change this error message for exceptions thrown outside of an action (like in Dispatcher setups or broken Ruby code) in public/500.html" Now, before starting script/server I modiffied config/environment.rb and
2007 Jul 23
1
readline (LoadError)
hi, i''m a noob in ror, today i bought a book to learn ror. i do everthing that stand''s in this book, and the shit does''t work! i use Aptana IDE with RadRails the problem is: Loading development environment. /usr/lib/ruby/1.8/irb/completion.rb:10:in `require'': No such file to load -- readline (LoadError) from /usr/lib/ruby/1.8/irb/completion.rb:10 from
2007 Jul 10
3
need to add XTHML class attribute, link_to's html options?
I need to add a class attribute to the elements generated by link_to for my CSS to style the links. How can I do that? <%= link_to "Artworks", :controller => "artwork", :action => "list" %> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk"
2007 Jun 13
2
Delete the fixtures on a functionnal test
Hi, Since couple a day, I block with the delete of my fixtures in my functionnals test. In my controller, I need test a redirect if there are no value. But i load my fixtures in start of my test and in a specific test I want delete all. Only in this method, not in other method. In API, I discover the method delete_existing_fixtures, who seem the good practice, but I can''t find how use
2007 Jul 06
3
assert_equal - problems returning value from controller
Hi, I have the following assert_equal that is returning false. @q seems to be returning niil, but is set in the controller, how can I get hold of this value in my tests? assert_equal ''derby'', @q Thanks Mark -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups
2007 Jul 14
3
observe_field, does this generate HTML?
I don''t have Rails installed at the moment, I''d like to check myself, but it''s just a simple curiosity. observe_field fits into replacement tags <%= %>, which caught my attention because as far as I know it''s just javascript observing a field and should not stick anything into HTML. Is <%= merely used as an enabling method, or will there actually be
2007 Jul 19
8
Where do I put code for my own types?
Sorry for all the questions today... Beyond the obvious things--models, controllers, helpers, and other framework-related types--where should I put the code for my own types? For example, I was thinking of writing my own AJAX-friendly paginator, but I don''t know where to put the code for that sort of thing. I would prefer to keep things object-oriented, so I would rather do a lot of
2006 Aug 06
10
editor recommendation
Hello lsit, I''am new to rails (about 2 hours) and after the first lines of code I must say: Great! I love it! Can someone recommend me a editor? I run Ubuntu Dapper. Th?ngs -- Jochen Kaechelin, fvgi242ss, wlanhacking.de http://mail.wlanhacking.de/cgi-bin/mailman/listinfo http://www.gissmoh.de - Mein sonstiges Leben!!
2006 Feb 16
3
rescue_action_in_public question
I''m using the rescue_action_in_public example from the Agile book to handle errors and email serious ones to me. In my application.rb controller: def rescue_action_in_public(exception) logger.error("rescue_action_in_public executed") case exception when ActiveRecord::RecordNotFound, ActionController::RoutingError, ActionController::UnknownAction
2008 Sep 02
4
Rescue rails errors
Hi all, Sometime, I get the following error in my application: ActionController::InvalidAuthenticityToken in ManageController#site_servers ActionController::InvalidAuthenticityToken I tried to put the code in manage controller between begin ... rescue ... end but it didn''t catch the error. So I tried in the application.rb controller, I put the forgery code between begin ... rescue ...
2009 Aug 14
9
Rescuing from REXML::ParseException
Hello, When I call an action with some invalid XML or JSON data a parse exception gets raised from within Rails/Ruby (REXML or ActiveSupport::JSON). The problem that I''ve got is how to handle these exceptions. In my application_controller.rb I have the following for debugging purposes: def rescue_action_in_public(exception) respond_to do |request| request.all { render :text =>
2008 Feb 04
3
backup strategy
what's the prefered way to backup users mail? i use doevcot shipping with debian/etch an maildir. thanx -- jochen
2007 Jun 20
3
hover and displaying divs
Please take a look at: http://www.lovelybooks.de/library/index.html?resetTabs=1&resetList=1 Can someone give me a hint how to display the divs (?) when moving the mousepointer over the images? Thanx --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this
2010 Aug 08
2
issue with rescue_action_in_public! and testing 404 responses
Hello, I''m new to rails and I''m trying to wrap my heads around how to spec controllers using RSpec (using rails 3rc1 and rspec 2.0.0.beta.19). The problem I''ve run into is when I want to test that my controllers respond with a 404 for unfound records. Whenever I run the spec, the ActiveRecord::RecordNotFound exception is not caught by rails, causing the spec
2006 Feb 08
2
NameError (uninitialized constant UnknownAction)
Hi, I''m having a strange problem that only seems to be happening on our production server. I never get this error locally but get it quite often on the server. The other odd thing is it doesn''t seem to be resulting in any error pages on the site. Everything looks fine... I wanted to add a rescue_action_in_public to email me when there are errors. So I followed the
2006 Feb 07
1
AWDWR: NameError (uninitialized constant UnknownAction) in rescue_action_in_public
I copied (and modified) this code from AWDWR: def rescue_action_in_public(exception) case exception when ActiveRecord::RecordNotFound, ActionController::UnknownAction render :template=>''/error'', :layout=>''application'', :status=>''404 Not Found'' else render :template=>''/error'',
2008 Dec 03
2
Rails functional test how to assert json result?
As title, I want to have my functional test check results from a json render result, how can I achieve this? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this
2005 Dec 18
2
Default routes for unknown actions
Hi folks- I have the following map for default ''junk'' routes: map.connect ''*anything'', :controller => ''welcome'', :action => ''unknown'' Which works just fine for a URL like: "mysite.com/junkjunkjunk" However, it still tries to resolve an action when I do: "mysite.com/my_controller/junkjunkjunk"