jeffkreeftmeijer / navvy

Simple Ruby background job processor inspired by delayed_job, but aiming for database agnosticism.
https://jeffkreeftmeijer.com
Other
215 stars 23 forks source link

Backticks breaking Navvy under ActiveRecord+Postgres #3

Closed adam12 closed 14 years ago

adam12 commented 14 years ago

The backticks used to escape column names in the active_record adapter are causing issues when using the Postgres AR adapter. Postgres uses double quotes for escaping column names (IIRC), with backticks having a different function.

The obvious solution is just to remove all the backticks from job/active_record.rb, but I wonder if there is a way to escape the column names through AR?

fmluizao commented 14 years ago

AR has a method called quote_column_name that does exactly this. It could be used in this case.

adam12 commented 14 years ago

@fernandoluizao Thanks, not sure how I missed that one!

I've forked and pushed a fix here: adam12@087efac21b177204e937

Thoughts?

jeffkreeftmeijer commented 14 years ago

Great work guys, I merged your changes in and released 0.3.1 (http://rubygems.org/gems/navvy/versions/0.3.1) as a hotfix. :)

Thanks!