Hi. I just want to ask some help regarding my simple project. i’m a
rails newbie and right now, quite stuck with this.
I have this select_tag in my rhtml…
<%= select_tag ‘search[outcome]’, options_for_select(["", “qp1”, “qp2”,
“Not Processed”], (params[:search] && params[:search][:outcome])) %>
it works fine. But now, I want to get the distinct values of my
options_for_select from my database table, green.
how can i do this in my controller and view? thanks.