Created
November 25, 2010 08:54
-
-
Save carstengehling/715103 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 AnnonceController < .... | |
def index | |
get_ads(params) | |
end | |
def method_missing | |
category = request.uri.do-some-extracting-of-last-name (jagthunde, racehunde, etc) | |
get_ads({:category => category} + params) | |
render :action => 'index' | |
end | |
protected | |
def get_ads(options) | |
...her indsættes koden til at udtrække de relevante annoncer | |
@ads = some_find_thing..... | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment