This has a very large potential to break a very, very large amount of code.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-co...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
Visit this group at http://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.
Take a look at the Configatron gem.
Try works pretty well for this.
hash.try(:[], :data).try(:[], :details).try(:[], :id)
Or
hash[:data][:details][:id] rescue nil