Am 20.12.2008 um 18:00 schrieb Werner Laude:

Hallo.
ich mochte gerne bei

Model.find_by_plz(params[:plzcheck][:plz])

das Model austauschbar, abhängig von einer Bedingung machen..
Also je nachdem wer sich einlogged, bekommt eine andere Tabelle.

Hast du wirklich verschiedene Datenbank Tabellen?

paramModel = w%(City Town Settlement).include?(params[:model]) ? params[:model] : 'Town'
paramModel.constantize.find_by_plz ...

ciao, tom
--
Thomas R. "TomK32" Koll || http://tomk32.de || http://ananasblau.com
just a geek trying to change the world
Skype: TomK32 || Mail: [email protected]
http://flickr.com/people/tomk32

_______________________________________________
rubyonrails-ug mailing list
[email protected]
http://mailman.headflash.com/mailman/listinfo/rubyonrails-ug

Antwort per Email an