-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Update Action doesn't work for STI models #52
Comments
Thanks. We should definitely add STI models to the test suite to make sure we have everything working correctly. |
@tkleft We implemented some cukes to test STI and they all seem to pass. Could you please post the stacktrace and relevant code of the issue you had? |
I actually don't get an error....everything goes well, but the object is never updated. I patched the update_resource action to do this to fix the problem: controller do
end Perhaps it could be fixed upstream too by passing the correct attributes into the function. Are you able to repro this on your end? On May 25, 2011, at 7:56 PM, gregbell wrote:
|
Ah...just looked at your cuke. I think it doesn't cover the case I was using. Let me put what I was trying to accomplish in terms of your models: User and Publisher. I only have "User" registered with ActiveAdmin, not "Publisher," and I was trying to update a "Publisher" by going to /admin/users/:id/edit, and then save the form. Does that make sense? |
say you have the models
and register the active admin panel like this:
when you update an instance of ArticleCategory the form sends an article_category => { :name => "test" } where active_admin expects category => { :name => "test" }. you can fix this by adding :as => :category to the form.
|
When you edit a model that implements single-table inheritance, the updates are not saved
The text was updated successfully, but these errors were encountered: