watermarkchurch / wcc-contentful

An alternative to Contentful's contentful.rb ruby client, contentful_model, and contentful_rails gems all in one.
MIT License
2 stars 1 forks source link

fix for .first method on postgress store resulting in invalid tuple number 0 #59

Closed CollinSchneider closed 6 years ago

CollinSchneider commented 6 years ago

When using the Postgres data store, calling find_by(some_field: "some-field-that-does-not-exist") results in an <ArgumentError: invalid tuple number 0> due to the .first method not returning in time if result.num_tuples.zero? as it is designed in the other methods such as find, delete, set

jpowell commented 6 years ago

Great! Thanks for the improvement @CollinSchneider!