search for: current_vendors

Displaying 3 results from an estimated 3 matches for "current_vendors".

2010 Mar 22
7
How to reference a select_tag within a form
...s\new.html.erb file, I had the code: <% form_for(@expense) do |f| %> [snip] <p> <%= f.label :vendor %><br /> <%= f.text_field :vendor %> <br /> <div id="vendor_droplist> <%= select_tag "test", options_for_select(@current_vendors.collect { |v| v.nickname }), {:multiple => true} %> </div> </p> It brought up a list of vendor-names immediately under my Vendors textbox, which worked great as far as I was concerned. Then I tried to turn it into a real drop-down: 1. I added style="display:no...
2010 Mar 20
4
Displaying an image in a Rails form_for
...ses\new.html.erb that want to present this image in the following context: <p> <%= f.label :vendor %><br /> <%= f.text_field :vendor %> <%= f.image "DownArrow.jpg" %> <br> <%= select_tag "test", options_for_select(@current_vendors.collect { |v| v.nickname }), {:multiple => true} %> </p> But Rails gushes the unforgiving response: undefined method `image'' for #<ActionView::Helpers::FormBuilder: 0x48194e0> I couldn''t find anything helpful in: -- http://api.rubyonrails.org/classes/Actio...
2010 Apr 14
35
Conditionally adding a link to a form -- how?
I''ve got two entities created by scaffolding: Expense & Vendor In Expense#new there''s a form with a Vendors-drop-down and a NewVendor- button. The latter button brings up Vendor#new. The Create button in Vendor#new brings up Vendor#show with Edit & Back links. I want to append a third link conditionally to Vendor#show: if the Expense#new form led to the Vendor#show