Skip to content

Instantly share code, notes, and snippets.

@knorrium
Created January 23, 2013 01:42
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save knorrium/4600977 to your computer and use it in GitHub Desktop.
Save knorrium/4600977 to your computer and use it in GitHub Desktop.
Padrino admin with dropdown lists
# Source: http://mph.puddingbowl.org/2011/04/padrino/
get :new do
@clients = Client.all
@software = SiteSoftware.all
@site = Site.new
render 'sites/new'
end
<div class="group">
<%= f.label :client_id %><%= f.error_message_on :client_id %><br /><br />
<%= f.select(:client_id, :collection => @clients, :fields => [:name, :id])%>
<span class="description">Pick the Site Client</span>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment