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

Model "Page" conflicts with #register_page #959

Closed
papayaah opened this issue Feb 1, 2012 · 3 comments
Closed

Model "Page" conflicts with #register_page #959

papayaah opened this issue Feb 1, 2012 · 3 comments

Comments

@papayaah
Copy link

papayaah commented Feb 1, 2012

I'm getting this error on my Page class:

Collection is not a paginated scope. Set collection.page(params[:page]).per(10) before calling :paginated_collection.

Its weird it is no different than my users. This is how i register the page:

ActiveAdmin.register Page do
end

Any idea?

@pcreux
Copy link
Contributor

pcreux commented Feb 1, 2012

I wonder if that has anything to do with the "register_page" feature.

What happens if you do ActiveAdmin.register Page, :as => "fancy_page"?

@papayaah
Copy link
Author

papayaah commented Feb 1, 2012

That made it work - yeah things act up strange when I start to name my model "Page".

Alas, I needed to show something to my employer today so I had to come up with something that is workign and i renamed everything to StaticPage instead Hah!

I guess i'll just revert to an earlier commit now that this seem to do the trick.

On Feb 1, 2012, at 8:18 PM, Philippe Creux wrote:

I wonder if that has anything to do with the "register_page" feature.

What happens if you do ActiveAdmin.register Page, :as => "fancy_page"?


Reply to this email directly or view it on GitHub:
#959 (comment)

@pcreux
Copy link
Contributor

pcreux commented Feb 1, 2012

I'm happy that you can show something to your employer today. :) I'm renaming your issue. Thanks for confirming!

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

2 participants