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

Miscellaneous Cleanup #2075

Merged
merged 1 commit into from
Apr 9, 2013
Merged

Miscellaneous Cleanup #2075

merged 1 commit into from
Apr 9, 2013

Conversation

seanlinsley
Copy link
Contributor

These are minor things I've run across that needed fixing. They're mainly a byproduct of #1926, but didn't belong there.

def current_filter
filters[1..-1].inject(filters.first){|a,b| @object.send(b[1].to_sym) ? b : a }[1]
( filters.detect{ |(_,query)| @object.send query } || filters.first )[1]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It still isn't clear what @object.send query is actually doing, but at least now the flow of the logic is comprehensible.

macfanatic added a commit that referenced this pull request Apr 9, 2013
@macfanatic macfanatic merged commit 4fd8fd0 into activeadmin:master Apr 9, 2013
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

Successfully merging this pull request may close these issues.

2 participants