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

[WIP] Customizable uneditable attributes #152

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tfe
Copy link
Contributor

@tfe tfe commented Jan 30, 2015

No specs yet unfortunately, and it doesn't seem like the primary docs are contained in the repo either.

I would say that the existing test suite runs, but I had a lot of trouble getting it to run. I'd be happy to walk through the issues I ran into with someone offline though.

Mainly I just made this for my own use, but thought I'd toss it back upstream to see if you guys could use it. No worries if not.

@tfe tfe changed the title Customizable uneditable attributes [WIP] Customizable uneditable attributes Feb 11, 2015
@tfe
Copy link
Contributor Author

tfe commented Feb 11, 2015

Editing this to be a WIP... I found a bug where the presence of this won't let a database be migrated from scratch. An error is thrown during rake db:migrate because upmin tries to create a new instance of the model class, but the table doesn't exist yet.

To fix it, default_uneditable_attributes needs to be accessible without instantiating a new instance. However because of the way the default attributes are currently provided in the ORM adapter, it needs to be instantiated so that the right ORM extensions are included (happens in initialize).

… uneditable attributes in an admin class definition does not result in an instance of the model class being instantiated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants