Skip to content

Instantly share code, notes, and snippets.

@mjtko
Created September 4, 2011 20:07
Show Gist options
  • Save mjtko/1193422 to your computer and use it in GitHub Desktop.
Save mjtko/1193422 to your computer and use it in GitHub Desktop.
<%= simple_form_for([@pacient, @retetum]) do |f| %>
<%= f.error_notification %>
<div class="inputs">
<%= f.input :data %>
<%= f.input :cantitate %>
<%= f.input :serie %>
<%= f.input :medicamente_id do %>
<%# select(:retetum, :medicamente_id, Medicamente.pastile) %>
<%= select(:retetum, :medicamente_id, Medicamente.clase,
{:onchange => remote_function(:url => {:action => :update_pastile},
:with => "'clasa='+value")} %>
<% end %>
</div>
<div class="pastile"><%= render 'pastile', :collection => @retetum.pastile %></div>
<br />
<div class="actions">
<%= f.button :submit %>
<%= link_to 'Tipareste reteta', new_pacient_retetum_path(@pacient, :format=> 'pdf') %>
</div>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment