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

Pagination #210

Closed
hbdev opened this issue Jun 18, 2011 · 12 comments
Closed

Pagination #210

hbdev opened this issue Jun 18, 2011 · 12 comments

Comments

@hbdev
Copy link

hbdev commented Jun 18, 2011

Hello All,

How pagination is added to lising pages???

@borisrorsvort
Copy link

its using gem "will_paginate", ">= 3.0.pre2" if i'm not mistakened

@hbdev
Copy link
Author

hbdev commented Jun 20, 2011

ok but is have to set per page value, how do I set that??

@hbdev hbdev closed this as completed Jun 20, 2011
@hbdev hbdev reopened this Jun 20, 2011
@gregbell
Copy link
Contributor

You can set the default_per_page in config/initializers/active_admin.rb. Eg:

# config/initializers/active_admin.rb
config.default_per_page = 100

If you want to do this on a per resource basis, you can set it through an instance variable (Note this is probably going to be updated in future releases so it may break at some point):

ActiveAdmin.register Post do
  before_filter :only => :index do
    @per_page = 100
  end
end

@hbdev
Copy link
Author

hbdev commented Jun 20, 2011

ok. That hepled me a lot. Thank you very much grekbell and borisrorsvort for your response :)

@borisrorsvort
Copy link

didn't do much ^^ Though, it would actually be nice to extend the documentation for these kind of thing.
@gregbell is it possible to make a tutorials wiki page on github (cf Devise) with shared customization tutorials ?

@gregbell
Copy link
Contributor

Definitely working on the documentation right now. The wiki is a great place for this type of adhoc tutorial. Feel free to add pages to the wiki or fork the project and add docs to the README.

The all in one README docs worked for a while, but I think the documentation needs are getting to be a little more. So I'm definitely looking for suggestions moving forward. My current thinking is that the wiki is the place for it. The hope is that the wiki can be used for master on github and then the current version would live on activeadmin.info.

Thoughts?

@borisrorsvort
Copy link

@gregbell nice :) so i think you need to allow users to create new pages then , because right now its not possible.

@gregbell
Copy link
Contributor

Oh sorry about that. I just updated the settings.

@borisrorsvort
Copy link

Don't know why, but we still can't edit the wiki homepage.

@gregbell
Copy link
Contributor

I don't think there is a homepage yet. It's just an index listing of pages that have been created. You should be able to create a new page and it'll just show up

@borisrorsvort
Copy link

how did devise did then ?
https://github.com/plataformatec/devise/wiki

@MGPalmer
Copy link

FYI, I linked the entry to the main Wiki page now.

Also, please note that while you can use @per_page in a filter, the "page_entries_info" helper will still display "entry 1-30 of 50" in the index header, i.e. it will still use the global default.

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

4 participants