Skip to content

Instantly share code, notes, and snippets.

@carstengehling
Created November 25, 2010 08:54
Show Gist options
  • Save carstengehling/715103 to your computer and use it in GitHub Desktop.
Save carstengehling/715103 to your computer and use it in GitHub Desktop.
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