Topic: Trouble with db query
I'm just starting out and having problems creating a query.
I want to display the contents of a field in my database table, I have the row available as params[:id] and the column as params[:field].
deal = Deal.find(params[:id])
But that doesn't work. If I specify a column name, e.g render_text deal.name, it works, but I want to be able to base the column name of that param[:field], not have it fixed.
Thank you for any help,