Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ActiveRecord? #176

Open
jrgriffiniii opened this issue Aug 1, 2019 · 2 comments
Open

Support ActiveRecord? #176

jrgriffiniii opened this issue Aug 1, 2019 · 2 comments

Comments

@jrgriffiniii
Copy link
Contributor

This would definitely require some breaking changes in Controller behavior. Essentially, one would need more than the ID of the resource in order to query the proper table in https://github.com/samvera/hydra-editor/blob/master/lib/hydra_editor/controller_resource.rb#L3. This provides the resource for CanCan authorization, and there are tests which make it evident that no errors are thrown when the Class of the resource is not supplied in the HTTP request parameters: https://github.com/samvera/hydra-editor/blob/master/spec/controllers/records_controller_spec.rb#L132

These requests would need to fail unless the type parameter were provided so that https://github.com/samvera/hydra-editor/blob/master/lib/hydra_editor/controller_resource.rb#L8 will resolve.

@cjcolvar
Copy link
Member

cjcolvar commented Aug 1, 2019

What if params[:id] were a GlobalID?

@no-reply
Copy link
Member

If we can upgrade this ticket to "Support arbitrary model types" I can start work on it ASAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

3 participants