Created
October 9, 2015 05:12
-
-
Save sclinede/375f4e3066e5844eecad to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Admin::BaseFilrator | |
def filtered_by?() | |
end | |
def get_filter() | |
end | |
end | |
class Admin::CompaniesFiltrator < Admin::BaseFiltrator | |
pattr_initialize :params | |
def filtered_by_ | |
end | |
class ... | |
def joins_for_collection | |
result = [] | |
%w(region test_packet statistics).each { |filter| send("filter_by_#{filter}", result) } | |
result.join(' ') | |
end | |
def filter_by_region | |
if bla-lba-bla | |
... | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment