code4lib / ruby-oai

a Ruby library for building OAI-PMH clients and servers
MIT License
62 stars 42 forks source link

Prefix column names with model's table name in ActiveRecord wrapper. #102

Closed barmintor closed 2 years ago

barmintor commented 2 years ago

Rebase #39 Update tests to demonstrate the bug and verify the change.

barmintor commented 2 years ago

@jrochkind I think you are using the ActiveRecordWrapper - can you try this branch in your application?

jrochkind commented 2 years ago

I don't think my app has the condition this is meant to fix: "If the model has a default scope which joins other tables" -- I don't think I have that.

However, my limited automated tests and limited manual testing against this branch seems to indicate it does not cause a problem for me, everything seems to work as expected. I haven't tested more than a basic oai pmh smoke test.

barmintor commented 2 years ago

You probably do not (you would have to explicitly create such a scope for your model, and it is supported but discouraged), but I wanted to make sure it was working with a non-test case.