brentd / xray-rails

☠️ A development tool that reveals your UI's bones
MIT License
1.22k stars 79 forks source link

Fix Rails 3.2 compatibility by not using `try` #72

Closed mattbrictson closed 8 years ago

mattbrictson commented 8 years ago

The ActiveSupport try method works differently in different versions of Rails. In some versions it checks respond_to?; others do not. It is safer (and more compatible) to explicitly use respond_to? instead.

Fixes #71

mattbrictson commented 8 years ago

@nnc Can you test my branch and verify it fixes the Rails 3.2 problem you're having? Thanks!

nnc commented 8 years ago

@mattbrictson works like a charm. Thanks!