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

Sorting fix for attributes that have mixed case first letters #1

Closed
AlanMcCann opened this issue Sep 2, 2010 · 3 comments
Closed

Comments

@AlanMcCann
Copy link
Contributor

Example
User 1: Zeus
User 2: jupiter

The list of letters would show up as
Z | J

By changing
def pagination_letters
all.sort_by{|obj| obj.send(@Attribute)}.group_by {|group| group.send(@Attribute)[0].chr.upcase}.keys
end

To
def pagination_letters
all.sort_by{|obj| obj.send(@Attribute).upcase}.group_by {|group| group.send(@Attribute)[0].chr.upcase}.keys
end

It all works
J | Z

Thanks for this tool, by the way!

@edendevelopment
Copy link
Owner

Hey, Alan looks great.

Can you fork it and send a pull request with the fix (and a test) please?

Thanks,
Steve

@AlanMcCann
Copy link
Contributor Author

Done. See the pull request and message.

Thanks!

@aimeerivers
Copy link
Collaborator

Thanks very much for spotting the mistake and providing a fix and tests for it. Version 0.1.1 is now available.

This issue was closed.
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