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

Unable to create views for "Comment" model #64

Closed
balvig opened this issue May 19, 2011 · 4 comments
Closed

Unable to create views for "Comment" model #64

balvig opened this issue May 19, 2011 · 4 comments

Comments

@balvig
Copy link

balvig commented May 19, 2011

I suppose it is because active_admin itself uses a Comment model but I am unable to create an admin view for Comment.

Using the following code:

ActiveAdmin.register Comment do

end

Produces the following error:

ActiveAdmin::ResourceMismatchError
Tried to register Comment as Comment but already registered to Comment
@ghost
Copy link

ghost commented May 20, 2011

I'm having the same issue

@balvig
Copy link
Author

balvig commented May 20, 2011

For what it's worth, I found a workaround which is to use the :as => option to rename the comment:

ActiveAdmin.register Comment, :as => "BlogComment" do
end

@jarinudom
Copy link

Since the Comment model is super common, maybe it would be good to use ActiveAdminComment instead.

@gregbell
Copy link
Contributor

Closing this ticket and added a new feature for 0.4.0 #301

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants