ruby on rails - record not found but not sure how - how to get back specific sql call raising this? -



ruby on rails - record not found but not sure how - how to get back specific sql call raising this? -

i think subject says all. work?

class applicationcontroller < actioncontroller::base rescue_from exception, :with => :bad_call def bad_call # how log specific sql activerecord::recordnotfound end end

sorry vague question should clear question , tremendous help. how log info esp in development?

ths in advance

if did understand right should it.

rescue_from activerecord::recordnotfound |exception| rails.logger.info exception end

i'd suggest reading topic why bad rescue exception.

upd: oh, guess i'm wrong. won't give sql query if need.

ruby-on-rails rails-activerecord

Comments

Popular posts from this blog

javascript - mongodb won't find my schema method in nested container -

Hibernate criteria by a list of natural ids -

ios - Lagging ScrollView with UIWebview inside -