top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

Rails: Is it possible to catch exceptions raised in callbacks?

+2 votes
128 views

Is it possible to catch exceptions raised in callbacks like after_create in the controller?

posted Nov 26, 2013 by Abhay Kulkarni

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

1 Answer

+1 vote

Of course. Those callbacks are synchronous, so the controller will catch those exceptions.

answer Nov 26, 2013 by Meenal Mishra
Similar Questions
+1 vote

I would like to know if it is possible to deploy a Ruby on Rails App to the Amazon AWS cloud, and if it is, which is the best way? Is there an updated tutorial to do so?

+2 votes

Also is there a way to detect if the user presses a key in Python that works on most OS's? I've only seen 1 method and that only works in Python 2.6 and less. If you get the key, can you store it in a variable?

+1 vote

I deployed one small app in heroku built on ROR, now I want to send mails. How is it possible can anyone give me a details how to do it.

+1 vote

I'm trying to use D3, a javascript data visualization library in my rails app. The problem is that I can't figure out where to put the d3.js source and my .json data so that rails will serve it.

My problem is in the way d3 issues a GET request when it looks for my json and d3.js files.

Things I tried:- setting up a static pages folder that is served with high_voltage gem. This didn't work for me as I couldn't get around my application layout so it wrapped my js and json in html. I think this is why this didn't work.- putting the files to be served in the public folder. This didn't work because it couldn't find the routes for the public folder. I did turn on config.serve_static_assets in the production enviroment config file.
I feel like this question should have a simple answer as everything works perfectly if I put my html, json and d3.js files into a folder and start a simple python http server in that folder. I think my problem is in my understanding of the way rails is trying to serve things.

0 votes

What is the best method to manage image uploads in Rails? Is there a tool that allows auto-resizing upon image upload based on predefined dimensions? Moreover, is there any tool available that makes it possible to render / regenerate the same originally uploaded image using alternative view based styles, e.g. thumbs, 320x200 or 640x480 etc..?

Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...