开发者

Deprecation warnings on Rails 3 RC don't help me

开发者 https://www.devze.com 2023-01-12 22:44 出处:网络
Very often in Rails 3, when I get a deprecation warning, the line reference I get is in the Rails framework instead of the actual deprecated line!

Very often in Rails 3, when I get a deprecation warning, the line reference I get is in the Rails framework instead of the actual deprecated line!

For example, I try to save a user model :

irb(main):006:0> user.save

DEPRECATION WARNING: save(true) is deprecated, 开发者_StackOverflow中文版please give save(:validate => true) instead. (called from save at /home/novagile/www/novagolf/releases/20100820143809/vendor/bundle/ruby/1.8/gems/activerecord-3.0.0.rc/lib/active_record/validations.rb:43)

=> false

Great! How should I know where exactly the faulty save(true) comes from? I've "grep"ed my project without success so it may be in one of the gem I use...


Have you got full logging turned on? If so - check your log-files for a full backtrace. The full backtrace should point out the full calling-stack including the line of your code that caused the issue.

0

精彩评论

暂无评论...
验证码 换一张
取 消