chamnap / liquid-rails

Renders liquid templates with layout and partial support
https://rubygems.org/gems/liquid-rails
MIT License
118 stars 102 forks source link

Very non-informative error on non-existing Drop #15

Open Qqwy opened 8 years ago

Qqwy commented 8 years ago

In droppable.rb, safe_constantize is used. This means that whenever you call some_rails_model.to_liquid, instead of throwing a NameError: unitialized constant SomeRailsModelDrop, we get NoMethodError: undefined methodnew' for nil:NilClass`

So, I think that constantize would be better here than safe_constantize.