Posted By

pdxmph on 04/18/11


Tagged


Versions (?)

Padrino Select from Collection


 / Published in: Rails
 

  1. get :new do
  2. @clients = Client.all
  3. @software = SiteSoftware.all
  4. @site = Site.new
  5. render 'sites/new'
  6.  
  7. end
  8.  
  9.  
  10. <div class="group">
  11. <%= f.label :client_id %><%= f.error_message_on :client_id %><br /><br />
  12. <%= f.select(:client_id, :collection => @clients, :fields => [:name, :id])%>
  13. <span class="description">Pick the Site Client</span>
  14. </div>

Report this snippet  

You need to login to post a comment.