Hi Fred,
I employed your code and it looks/works great. I could swear my old
code populated an adjacent text-box, but I must have been
hallucinating.
Thank for you additional post which jump-started my effort for neater
code.
Best wishes,
Richard
On Apr 14, 7:02 am, Frederick Cheung
wrote:
>
On Apr 13, 8:03 pm, RichardOnRails
wrote:
> Hi Frederick,
>
> Thanks for your additional help with a simpler solution. I tried to
> replace my select_tag approach with the f.select approach:
>
> <%= f.select :vendor, @current_vendors %>
> <%# = select_tag "expense[vendor]",
>
Hi Frederick,
Thanks for your additional help with a simpler solution. I tried to
replace my select_tag approach with the f.select approach:
<%= f.select :vendor, @current_vendors %>
<%# = select_tag "expense[vendor]",
options_for_select(@current_vendors) %>
1. The f.select
On Apr 12, 8:59 pm, RichardOnRails
wrote:
> PRiyanka and sameera: Thank you both very much!!! I've been pulling
> my hair out for about a week with this thing.
>
> I didn't realize that the first argument of the select_tag function
> apparently identifies the target
> of the selected item in th
Hey, Priyanka and Sameera,
I've thought about design I'm aiming for and realized that I can
accomplish it in a very straight-forward way.
Again, thanks for your great solution to my original problem.
Best wishes,
Richard
On Apr 10, 10:18 pm, RichardOnRails
wrote:
> In app\views\expenses\new.
PRiyanka and sameera: Thank you both very much!!! I've been pulling
my hair out for about a week with this thing.
I didn't realize that the first argument of the select_tag function
apparently identifies the target
of the selected item in the format "table_name[column_name]".
Now that you've giv
hi RichardOnRails
Try this
<%= select_tag 'expense[vendor]',
options_for_select(@current_vendors) %>
cheers,
sameera
On Apr 11, 7:18 am, RichardOnRails
wrote:
> In app\views\expenses\new.html.erb, I (mistakenly) replaced the
> script/generated:
> <%= f.label :vendor %>
> <%= f.text_field
RichardOnRails wrote:
> In app\views\expenses\new.html.erb, I (mistakenly) replaced the
> script/generated:
> <%= f.label :vendor %>
> <%= f.text_field :vendor %>
> with:
> <%= f.label :vendor %>
> <% @current_vendors = Vendor.find(:all, :order=>"nickname") %>
> <%= select_tag "list", options_for
8 matches
Mail list logo